fix: handle empty recipeInstructions

This commit is contained in:
Max Richter
2025-10-22 13:42:27 +02:00
parent 314d65e53a
commit 50de81ccb2

View File

@@ -59,7 +59,7 @@ const resource = await memorium.listResource(
<h2>Ingredients</h2> <h2>Ingredients</h2>
<ul> <ul>
{ {
resource?.content.recipeIngredient.map((ingredient) => ( resource?.content?.recipeIngredient.map((ingredient) => (
<li>{markdownToText(ingredient)}</li> <li>{markdownToText(ingredient)}</li>
)) ))
} }
@@ -68,7 +68,7 @@ const resource = await memorium.listResource(
<h2>Steps</h2> <h2>Steps</h2>
<ol> <ol>
{ {
resource?.content.recipeInstructions.map((ingredient) => ( resource?.content?.recipeInstructions.map((ingredient) => (
<li>{markdownToText(ingredient)}</li> <li>{markdownToText(ingredient)}</li>
)) ))
} }