Skip to content

Commit

Permalink
fix(frontend): proper null check for notes (mealie-recipes#1583)
Browse files Browse the repository at this point in the history
Adds a proper check for the mealplan.recipe property in multiple places to resolve the bug described in mealie-recipes#1571. In development the page would fail to render.
  • Loading branch information
hay-kot authored Aug 20, 2022
1 parent aaeb162 commit 74548e9
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions frontend/pages/group/mealplan/planner.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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,
Expand Down

0 comments on commit 74548e9

Please sign in to comment.