Prechádzať zdrojové kódy

Bug fix: new recipe was not auto showing value for unit when it is a bottle type.

Lee Morgan 5 rokov pred
rodič
commit
02e791fcbd

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

@@ -64,7 +64,7 @@ let newRecipe = {
         if(ingredient.convert.toVolume > 0) select.children[1].style.display = "block";
         if(ingredient.convert.toLength > 0) select.children[2].style.display = "block";
 
-        select.value = ingredient.unit;
+        select.value = (ingredient.unit === "bottle") ? "ml" : ingredient.unit;
 
         document.getElementById("newRecipeChosenList").appendChild(element);
     },