Explorar o código

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

Lee Morgan %!s(int64=5) %!d(string=hai) anos
pai
achega
146f0185fe
Modificáronse 1 ficheiros con 1 adicións e 0 borrados
  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;