Ver código fonte

Bug fix: recipes were not updating correctly.

Lee Morgan 5 anos atrás
pai
commit
a3de298cee
2 arquivos alterados com 1 adições e 2 exclusões
  1. 0 1
      controllers/ingredientData.js
  2. 1 1
      controllers/recipeData.js

+ 0 - 1
controllers/ingredientData.js

@@ -156,7 +156,6 @@ module.exports = {
                 unitType: helper.getUnitType(array[i][locations.unit].toLowerCase())
             });
 
-            console.log(array[i][locations.unit]);
             if(array[i][locations.unit] === "bottle"){
                 ingredient.unitType = array[i][locations.bottleUnit];
                 ingredient.unitSize = helper.convertQuantityToBaseUnit(array[i][locations.bottleSize], array[i][locations.bottleUnit]);

+ 1 - 1
controllers/recipeData.js

@@ -170,7 +170,7 @@ module.exports = {
                 let recipes = [];
                 let currentRecipe = {};
                 for(let i = 1; i < array.length; i++){
-                    if(array[i].length === 0){
+                    if(array[i][locations.ingredient] === undefined){
                         continue;
                     }