Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- add '1' as searched value for 'is_user_defined' and 'is_visible' (createAttributesListQuery) - @gibkigonzo (#4075)
- Fix possibility to add same SKU with different custom options to the cart - @Michal-Dziedzinski (#3595)
- Fix `calculateProductTax` to find matching tax rules from ES for current product - @DylannCordel (#4056)
- Set `totals` in products in cart always in reactive way - @psmyrek (#4079)

## [1.11.1] - 2020.02.05

Expand All @@ -21,7 +22,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Changed / Improved
- Set cache tag when loading a category - @haelbichalex (#3940)
- In development build `webpack.config.js` in theme folder is now called without the `default` key
- In development build `webpack.config.js` in theme folder is now called without the `default` key - @psmyrek

### Fixed
- Added Finnish translations - @mattiteraslahti and @alphpkeemik
Expand Down
3 changes: 2 additions & 1 deletion core/modules/cart/store/mutations.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import Vue from 'vue'
import { MutationTree } from 'vuex'
import * as types from './mutation-types'
import CartState from '../types/CartState'
Expand Down Expand Up @@ -56,7 +57,7 @@ const mutations: MutationTree<CartState> = {
let record = state.cartItems.find(p => (productsEquals(p, product) || (p.server_item_id && p.server_item_id === product.server_item_id)))
if (record) {
EventBus.$emit('cart-before-itemchanged', { item: record })
record = Object.assign(record, product)
Object.entries(product).forEach(([key, value]) => Vue.set(record, key, value))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it shouldn't be such a logic inside of mutation... but I understand that is the only solution

EventBus.$emit('cart-after-itemchanged', { item: record })
}
},
Expand Down