소스 검색

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