Explorar o código

Fix remove ingredient not removing from front end

Lee Morgan %!s(int64=6) %!d(string=hai) anos
pai
achega
6871783161
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      views/inventoryPage/inventory.js

+ 1 - 1
views/inventoryPage/inventory.js

@@ -158,7 +158,7 @@ let inventoryObj = {
                         banner.createError(result.data);
                     }else{
                         for(let i = 0; i < merchant.inventory.length; i++){
-                            if(id === merchant.inventory[i]._id){
+                            if(id === merchant.inventory[i].ingredient._id){
                                 merchant.inventory.splice(i, 1);
                                 break;
                             }