Clean up and fix build bug

This commit is contained in:
2026-04-13 16:19:34 -07:00
parent e92657b90d
commit 8ce2e32f54
3 changed files with 7 additions and 5 deletions

View File

@@ -12,7 +12,7 @@ export async function getPublishedPosts(
const allPosts = (await getCollection("blog", publishedOnly)).sort(
(a, b) => b.data.pubDate.valueOf() - a.data.pubDate.valueOf(),
);
return tag ? allPosts.filter((p) => p.data.tags.includes(tag)) : allPosts;
return tag ? allPosts.filter((p) => p.data.tags?.includes(tag)) : allPosts;
}
export async function getAllTags(): Promise<string[]> {