浏览代码

Bug fix: recipes were not updating correctly.

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