fixed null units breaking shopping lists

This commit is contained in:
vabene1111
2020-10-15 21:19:49 +02:00
parent 163b259bd1
commit 2d2c38517c

View File

@@ -592,7 +592,7 @@
this.shopping_list.entries.push({ this.shopping_list.entries.push({
'list_recipe': slr.id, 'list_recipe': slr.id,
'food': i.food, 'food': i.food,
'unit': ((i.unit !== undefined) ? i.unit : {'name': ''}), 'unit': ((i.unit !== undefined && i.unit !== null) ? i.unit : {'name': ''}),
'amount': i.amount, 'amount': i.amount,
'order': 0 'order': 0
}) })