Clean up and fix build bug
This commit is contained in:
@@ -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[]> {
|
||||
|
||||
Reference in New Issue
Block a user