fix: handle nullable description in layouts

This commit is contained in:
Neeldhara Misra 2026-02-20 12:38:56 +05:30
parent ec098dc88f
commit d042fc624d
2 changed files with 2 additions and 2 deletions

View file

@ -51,7 +51,7 @@ const post = Astro.props;
const { Content, headings } = await render(post);
---
<Layout title={post.data.title} description={post.data.description}>
<Layout title={post.data.title} description={post.data.description ?? ""}>
<Container>
<div class="animate">
<BackToPrevious href="/blog">Back to blog</BackToPrevious>

View file

@ -23,7 +23,7 @@ const project = Astro.props;
const { Content, headings } = await render(project);
---
<Layout title={project.data.title} description={project.data.description}>
<Layout title={project.data.title} description={project.data.description ?? ""}>
<Container>
<div class="animate">
<BackToPrevious href="/projects">Back to projects</BackToPrevious>