From 98bdad5955591fe10d65809a03f0c255ee7df8a5 Mon Sep 17 00:00:00 2001 From: vabene1111 Date: Mon, 29 Jun 2020 22:58:31 +0200 Subject: [PATCH] second fix --- cookbook/templates/forms/edit_internal_recipe.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cookbook/templates/forms/edit_internal_recipe.html b/cookbook/templates/forms/edit_internal_recipe.html index 098765526..6179c6757 100644 --- a/cookbook/templates/forms/edit_internal_recipe.html +++ b/cookbook/templates/forms/edit_internal_recipe.html @@ -409,7 +409,7 @@ if (this.recipe !== undefined) { for (let s of this.recipe.steps) { for (let i of s.ingredients) { - if (i.unit !== undefined &&i.unit.id === undefined) { + if (i.unit !== null && i.unit.id === undefined) { this.units.push(i.unit) } } @@ -428,7 +428,7 @@ if (this.recipe !== undefined) { for (let s of this.recipe.steps) { for (let i of s.ingredients) { - if (i.food !== undefined &&i.food.id === undefined) { + if (i.food !== null && i.food.id === undefined) { this.foods.push(i.food) } }