orderiom-api-package 0.2.52 → 0.2.53

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.52",
3
+ "version": "0.2.53",
4
4
  "description": "This package will install all necessary API calls for every orderiom restaurant",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -311,19 +311,12 @@ const actions = {
311
311
  f.RestaurantProductId === Number(data.productId)
312
312
  );
313
313
 
314
- if(!basketProduct){
315
- return {
316
- type: 'error',
317
- msg: 'Product not found'
318
- }
319
- }
320
-
321
314
  const basket = JSON.parse(localStorage.getItem("basket"));
322
315
  const basketId = !rootState.orderiomApiPackage.auth.privateToken ? {
323
316
  basketId: basket.find((basket) => basket.restaurantId == data.restaurantId).basketId
324
317
  } : {}
325
318
 
326
- basketProduct.changingQuantity = true;
319
+ if(basketProduct) basketProduct.changingQuantity = true;
327
320
  return axios.post('api/basket/add-product-package-items', {
328
321
  ...basketId,
329
322
  ...data
@@ -332,7 +325,7 @@ const actions = {
332
325
  }).catch(
333
326
  commonErrorCallback()
334
327
  ).finally(() => {
335
- basketProduct.changingQuantity = false;
328
+ if(basketProduct) basketProduct.changingQuantity = false;
336
329
  });
337
330
  },
338
331
  addAddress({ rootState }, data) {