ソースを参照

Bug fix: editing ingredients did not display what the current unit of the ingredient was.

Lee Morgan 5 年 前
コミット
fb8ae1cf02

+ 2 - 2
views/dashboardPage/bundle.js

@@ -1504,8 +1504,8 @@ let editIngredient = {
             button.innerText = units[i].toUpperCase();
             button.onclick = ()=>{this.changeUnit(button)};
             buttonList.appendChild(button);
-
-            if(units[i] === ingredient.ingredient.unitType){
+            
+            if(units[i] === ingredient.ingredient.unit){
                 button.classList.add("unitActive");
             }
         }

+ 2 - 2
views/dashboardPage/js/sidebars/editIngredient.js

@@ -43,8 +43,8 @@ let editIngredient = {
             button.innerText = units[i].toUpperCase();
             button.onclick = ()=>{this.changeUnit(button)};
             buttonList.appendChild(button);
-
-            if(units[i] === ingredient.ingredient.unitType){
+            
+            if(units[i] === ingredient.ingredient.unit){
                 button.classList.add("unitActive");
             }
         }