Explorar el Código

Fix remove ingredient not removing from front end

Lee Morgan hace 6 años
padre
commit
6871783161
Se han modificado 1 ficheros con 1 adiciones y 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;
                             }