From 2d2c38517cbb15680fe702e39f98e72b9d5fe39f Mon Sep 17 00:00:00 2001 From: vabene1111 Date: Thu, 15 Oct 2020 21:19:49 +0200 Subject: [PATCH] fixed null units breaking shopping lists --- cookbook/templates/shopping_list.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cookbook/templates/shopping_list.html b/cookbook/templates/shopping_list.html index 30de967f2..fd8bbd7cd 100644 --- a/cookbook/templates/shopping_list.html +++ b/cookbook/templates/shopping_list.html @@ -592,7 +592,7 @@ this.shopping_list.entries.push({ 'list_recipe': slr.id, 'food': i.food, - 'unit': ((i.unit !== undefined) ? i.unit : {'name': ''}), + 'unit': ((i.unit !== undefined && i.unit !== null) ? i.unit : {'name': ''}), 'amount': i.amount, 'order': 0 })