diff --git a/src/utils.ts b/src/utils.ts index f168648..c839127 100644 --- a/src/utils.ts +++ b/src/utils.ts @@ -7,7 +7,7 @@ export async function getPosts(collection: keyof ContentEntryMap) { }); return posts.sort((a, b) => a.data.pubDate && b.data.pubDate - ? +b.data.pubDate - +a.data.pubDate + ? Number(b.data.pubDate) - Number(a.data.pubDate) : 0, ); }