Skip to content

Commit 82bd60d

Browse files
committed
Added null checks preventing build from completing
1 parent 540d8c3 commit 82bd60d

File tree

2 files changed

+4408
-3999
lines changed

2 files changed

+4408
-3999
lines changed

packages/astro-theme/components/BlogPostCard.astro

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,11 @@ interface Props {
1414
}
1515
1616
const { post: postOrSlug, showMetadata = false, size = "narrow" } = Astro.props;
17+
18+
if (!postOrSlug) {
19+
return null;
20+
}
21+
1722
const post =
1823
typeof postOrSlug === "string"
1924
? await getEntry("blog", postOrSlug)

0 commit comments

Comments
 (0)