소스 검색

Fix bug in removing ingredients

Lee Morgan 6 년 전
부모
커밋
3fbc9794df
1개의 변경된 파일2개의 추가작업 그리고 1개의 파일을 삭제
  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;
                 }