浏览代码

When editing sub-ingredients, the current ingredient no longer displays as a choice.

Lee Morgan 5 年之前
父节点
当前提交
146f0185fe
共有 1 个文件被更改,包括 1 次插入0 次删除
  1. 1 0
      views/dashboardPage/js/modal.js

+ 1 - 0
views/dashboardPage/js/modal.js

@@ -228,6 +228,7 @@ let modal = {
 
         for(let i = 0; i < merchant.inventory.length; i++){
             let baseIngredient = merchant.inventory[i].ingredient;
+            if(baseIngredient === ingredient) continue;
             if(ingredient.subIngredients.find(j => j.ingredient.id === baseIngredient.id) === undefined){
                 let button = document.createElement("button");
                 button.innerText = baseIngredient.name;