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

@@ -15,7 +15,7 @@ COPY . .
ENV DATA_DIR=/app/data ENV DATA_DIR=/app/data
RUN mkdir -p $DATA_DIR && \ RUN mkdir -p $DATA_DIR && \
deno install --allow-import --allow-ffi --allow-scripts=npm:sharp@0.33.5-rc.1 -e main.ts &&\ deno install --allow-import --allow-ffi --allow-scripts=npm:sharp -e main.ts &&\
sed -i -e 's/"deno"/"no-deno"/' node_modules/@libsql/client/package.json &&\ sed -i -e 's/"deno"/"no-deno"/' node_modules/@libsql/client/package.json &&\
deno task build deno task build

View File

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

View File

@@ -36,7 +36,7 @@ function ValidRecipe({
portion, portion,
}: { recipe: RecipeResource; amount: Signal<number>; portion: number }) { }: { recipe: RecipeResource; amount: Signal<number>; portion: number }) {
const ingredients = parseIngredients( const ingredients = parseIngredients(
recipe.content.recipeIngredient?.join("\n"), recipe.content.recipeIngredient?.join("\n") || "",
); );
return ( return (
@@ -54,7 +54,8 @@ function ValidRecipe({
<div class="pl-2"> <div class="pl-2">
<ol class="list-decimal grid gap-4"> <ol class="list-decimal grid gap-4">
{recipe.content.recipeInstructions && {recipe.content.recipeInstructions &&
(recipe.content.recipeInstructions.filter((inst) => !!inst?.length) (recipe.content.recipeInstructions
.filter((inst) => !!inst?.length)
.map((instruction) => { .map((instruction) => {
return ( return (
<li <li

View File

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