We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 49f6c3b commit 7ab1910Copy full SHA for 7ab1910
src/store/mutations.js
@@ -97,7 +97,7 @@ export default {
97
let shop = cart[shopid] = (cart[shopid] || {});
98
let category = shop[category_id] = (shop[category_id] || {});
99
let item = category[item_id] = (category[item_id] || {});
100
- if (item) {
+ if (item && item[food_id]) {
101
if (item[food_id]['num'] > 0) {
102
item[food_id]['num']--;
103
state.cartList = {...cart};
0 commit comments