fix: accessing nonexistant variable
This commit is contained in:
@@ -36,7 +36,7 @@ function ValidRecipe({
|
||||
portion,
|
||||
}: { recipe: RecipeResource; amount: Signal<number>; portion: number }) {
|
||||
const ingredients = parseIngredients(
|
||||
recipe.content.recipeIngredient?.join("\n"),
|
||||
recipe.content.recipeIngredient?.join("\n") || "",
|
||||
);
|
||||
|
||||
return (
|
||||
@@ -54,7 +54,8 @@ function ValidRecipe({
|
||||
<div class="pl-2">
|
||||
<ol class="list-decimal grid gap-4">
|
||||
{recipe.content.recipeInstructions &&
|
||||
(recipe.content.recipeInstructions.filter((inst) => !!inst?.length)
|
||||
(recipe.content.recipeInstructions
|
||||
.filter((inst) => !!inst?.length)
|
||||
.map((instruction) => {
|
||||
return (
|
||||
<li
|
||||
|
||||
Reference in New Issue
Block a user