From fd026154d8d70b8d75171e59c1d6aa17f3a3f1e5 Mon Sep 17 00:00:00 2001 From: vabene1111 Date: Fri, 4 Feb 2022 17:11:35 +0100 Subject: [PATCH] changed step header default and fixed ingredient rendering error --- vue/src/apps/RecipeEditView/RecipeEditView.vue | 2 +- vue/src/components/IngredientsCard.vue | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/vue/src/apps/RecipeEditView/RecipeEditView.vue b/vue/src/apps/RecipeEditView/RecipeEditView.vue index 547c2fbfb..4521f1b67 100644 --- a/vue/src/apps/RecipeEditView/RecipeEditView.vue +++ b/vue/src/apps/RecipeEditView/RecipeEditView.vue @@ -791,7 +791,7 @@ export default { let empty_step = { instruction: "", ingredients: [], - show_as_header: true, + show_as_header: false, time_visible: false, ingredients_visible: true, instruction_visible: true, diff --git a/vue/src/components/IngredientsCard.vue b/vue/src/components/IngredientsCard.vue index d1a8307d3..1036d6fa5 100644 --- a/vue/src/components/IngredientsCard.vue +++ b/vue/src/components/IngredientsCard.vue @@ -132,6 +132,7 @@ export default { let ingredient_list = this.steps .map((x) => x.ingredients) .flat() + .filter((x) => (x.food !== null && x.food !== undefined)) .map((x) => x.food.id) let params = { @@ -231,7 +232,7 @@ export default { ...i, shop: checked, shopping_status: shopping_status, // possible values: true, false, null - category: i.food.supermarket_category?.name, + category: i.food?.supermarket_category?.name, shopping_list: shopping.map((x) => { return { mealplan: x?.recipe_mealplan?.name,