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 +1 -1
- package/src/modules/order.js +2 -9
package/package.json
CHANGED
package/src/modules/order.js
CHANGED
|
@@ -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) {
|