Explorar o código

Bug fix: opening the new recipe sidebar more than once duplicated the ingredients.

Lee Morgan %!s(int64=5) %!d(string=hai) anos
pai
achega
04c9c5d519
Modificáronse 1 ficheiros con 1 adicións e 0 borrados
  1. 1 0
      views/dashboardPage/js/sidebars/newRecipe.js

+ 1 - 0
views/dashboardPage/js/sidebars/newRecipe.js

@@ -8,6 +8,7 @@ let newRecipe = {
         document.getElementById("recipeFileUpload").onclick = ()=>{controller.openModal("recipeSpreadsheet")};
         document.getElementById("newRecipeSearch").onkeyup = ()=>{this.populateChoices()};
 
+        this.unchosen = [];
         for(let i = 0; i < merchant.ingredients.length; i++){
             this.unchosen.push(merchant.ingredients[i].ingredient);
         }