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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "orderiom-api-package",
3
- "version": "0.2.33",
3
+ "version": "0.2.34",
4
4
  "description": "this package will install all neccessary api calls for every orderiom restaurant",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -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.log(error);
340
+ console.error(error);
336
341
  return false;
337
342
  }).finally(() => {
338
343
  commit('finishFetchingBasket')