|
@@ -58,8 +58,6 @@ const actions = {
|
|
|
})
|
|
|
},
|
|
|
selectProduct({ commit, dispatch }, payload) {
|
|
|
- console.log(payload)
|
|
|
-
|
|
|
if (payload.item.variant_count > 1) {
|
|
|
commit('setSelectedProduct', {
|
|
|
product: payload.item
|
|
@@ -75,6 +73,9 @@ const actions = {
|
|
|
product: null
|
|
|
})
|
|
|
|
|
|
+ if (!payload)
|
|
|
+ return
|
|
|
+
|
|
|
dispatch('addToCart', {
|
|
|
product: payload.data
|
|
|
})
|