Merge branch 'main' into deepsource-transform-36a8a0f8

This commit is contained in:
Michał 2024-05-25 11:27:48 +01:00 committed by GitHub
commit 9eb5dd22ef
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -7,7 +7,7 @@ export async function getPosts(collection: keyof ContentEntryMap) {
}); });
return posts.sort((a, b) => return posts.sort((a, b) =>
a.data.pubDate && b.data.pubDate a.data.pubDate && b.data.pubDate
? +b.data.pubDate - +a.data.pubDate ? Number(b.data.pubDate) - Number(a.data.pubDate)
: 0, : 0,
); );
} }