浏览代码

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

Lee Morgan 5 年之前
父节点
当前提交
fb8ae1cf02
共有 2 个文件被更改,包括 4 次插入4 次删除
  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");
             }
         }