Bläddra i källkod

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

Lee Morgan 5 år sedan
förälder
incheckning
fb8ae1cf02
2 ändrade filer med 4 tillägg och 4 borttagningar
  1. 2 2
      views/dashboardPage/bundle.js
  2. 2 2
      views/dashboardPage/js/sidebars/editIngredient.js

+ 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");
             }
         }