Procházet zdrojové kódy

Fix bug in removing ingredients

Lee Morgan před 6 roky
rodič
revize
3fbc9794df
1 změnil soubory, kde provedl 2 přidání a 1 odebrání
  1. 2 1
      views/dashboardPage/components/components.js

+ 2 - 1
views/dashboardPage/components/components.js

@@ -685,7 +685,8 @@ let ingredientDetailsComp = {
     remove: function(){
         for(let i = 0; i < merchant.recipes.length; i++){
             for(let j = 0; j < merchant.recipes[i].ingredients.length; j++){
-                if(this.ingredient.id === merchant.recipes[i].ingredients[j].ingredient._id){
+                if(this.ingredient.ingredient === merchant.recipes[i].ingredients[j].ingredient){
+                    console.log("something");
                     banner.createError("Must remove ingredient from all recipes before removing");
                     return;
                 }