소스 검색

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