orderiom-api-package 0.2.33 → 0.2.34
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/modules/product.js +6 -1
package/package.json
CHANGED
package/src/modules/product.js
CHANGED
|
@@ -27,6 +27,7 @@ const state = () => ({
|
|
|
27
27
|
shippingPrice: null,
|
|
28
28
|
fetchingBasket: false,
|
|
29
29
|
changingDeliveryType: false,
|
|
30
|
+
basketLoadedOnce: false,
|
|
30
31
|
});
|
|
31
32
|
const mutations = {
|
|
32
33
|
setSelectedDate(state, date) {
|
|
@@ -106,6 +107,9 @@ const mutations = {
|
|
|
106
107
|
},
|
|
107
108
|
finishChangingDeliveryType(state){
|
|
108
109
|
state.changingDeliveryType = false;
|
|
110
|
+
},
|
|
111
|
+
basketLoadedOnce(state){
|
|
112
|
+
state.basketLoadedOnce = true;
|
|
109
113
|
}
|
|
110
114
|
};
|
|
111
115
|
const actions = {
|
|
@@ -330,9 +334,10 @@ const actions = {
|
|
|
330
334
|
localStorage.setItem("basket", JSON.stringify(basket));
|
|
331
335
|
|
|
332
336
|
}
|
|
337
|
+
commit('basketLoadedOnce');
|
|
333
338
|
return true;
|
|
334
339
|
}).catch(error => {
|
|
335
|
-
console.
|
|
340
|
+
console.error(error);
|
|
336
341
|
return false;
|
|
337
342
|
}).finally(() => {
|
|
338
343
|
commit('finishFetchingBasket')
|