fix: accessing nonexistant variable

This commit is contained in:
Max Richter
2025-11-02 21:14:41 +01:00
parent 098da12ac4
commit 928782c453
4 changed files with 8 additions and 7 deletions

View File

@@ -57,7 +57,7 @@ export default async function Greet(
title: author?.name,
href: `/?q=${encodeURIComponent(author?.name)}`,
},
date.toString(),
datePublished.toString(),
]}
>
{movie.content.reviewRating && (

View File

@@ -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

View File

@@ -27,7 +27,7 @@ export default function Greet(
) {
const { serie, session } = props.data;
const { author = "", date = "", reviewBody } = serie?.content || {};
const { author = "", datePublished = "", reviewBody } = serie?.content || {};
const content = renderMarkdown(
removeImage(reviewBody, serie.image?.url),
@@ -60,10 +60,10 @@ export default function Greet(
<PageHero.Subline
entries={[
author && {
title: author,
title: author.name,
href: `/?q=${encodeURIComponent(author)}`,
},
date.toString(),
datePublished.toString(),
]}
>
{serie.content?.reviewRating && (