fix(frontend): proper null check for notes (#1583)
Adds a proper check for the mealplan.recipe property in multiple places to resolve the bug described in #1571. In development the page would fail to render.
This commit is contained in:
parent
aaeb162dd5
commit
74548e9152
1 changed files with 3 additions and 3 deletions
|
@ -218,7 +218,7 @@
|
||||||
<RecipeCard
|
<RecipeCard
|
||||||
v-for="mealplan in plan.meals"
|
v-for="mealplan in plan.meals"
|
||||||
:key="mealplan.id"
|
:key="mealplan.id"
|
||||||
:recipe-id="mealplan.recipe ? mealplan.recipe.id : null"
|
:recipe-id="mealplan.recipe ? mealplan.recipe.id : ''"
|
||||||
:image-height="125"
|
:image-height="125"
|
||||||
class="mb-2"
|
class="mb-2"
|
||||||
:route="mealplan.recipe ? true : false"
|
:route="mealplan.recipe ? true : false"
|
||||||
|
@ -236,8 +236,8 @@
|
||||||
{{ mealplan.entryType }}
|
{{ mealplan.entryType }}
|
||||||
</v-chip>
|
</v-chip>
|
||||||
<RecipeContextMenu
|
<RecipeContextMenu
|
||||||
:name="mealplan.recipe.name"
|
:name="mealplan.recipe ? mealplan.recipe.name : mealplan.title"
|
||||||
:recipe-id="mealplan.recipe.id"
|
:recipe-id="mealplan.recipe ? mealplan.recipe.id : ''"
|
||||||
:slug="mealplan.recipe ? mealplan.recipe.slug : ''"
|
:slug="mealplan.recipe ? mealplan.recipe.slug : ''"
|
||||||
:use-items="{
|
:use-items="{
|
||||||
delete: false,
|
delete: false,
|
||||||
|
|
Loading…
Reference in a new issue