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:
Hayden 2022-08-20 11:21:57 -08:00 committed by GitHub
parent aaeb162dd5
commit 74548e9152
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -218,7 +218,7 @@
<RecipeCard
v-for="mealplan in plan.meals"
:key="mealplan.id"
:recipe-id="mealplan.recipe ? mealplan.recipe.id : null"
:recipe-id="mealplan.recipe ? mealplan.recipe.id : ''"
:image-height="125"
class="mb-2"
:route="mealplan.recipe ? true : false"
@ -236,8 +236,8 @@
{{ mealplan.entryType }}
</v-chip>
<RecipeContextMenu
:name="mealplan.recipe.name"
:recipe-id="mealplan.recipe.id"
:name="mealplan.recipe ? mealplan.recipe.name : mealplan.title"
:recipe-id="mealplan.recipe ? mealplan.recipe.id : ''"
:slug="mealplan.recipe ? mealplan.recipe.slug : ''"
:use-items="{
delete: false,