Ver Fonte

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

Lee Morgan há 5 anos atrás
pai
commit
02e791fcbd
1 ficheiros alterados com 1 adições e 1 exclusões
  1. 1 1
      views/dashboardPage/js/sidebars/newRecipe.js

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