Skip to content

Commit

Permalink
Goodbye toSorted
Browse files Browse the repository at this point in the history
  • Loading branch information
oscarvz committed Dec 17, 2024
1 parent 0796e42 commit 37ce11f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion www/src/pages/blog/index.astro
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import StarlightPage from "@astrojs/starlight/components/StarlightPage.astro";
const allPostsUnsorted = await getCollection("blog");
const postsUnsorted = allPostsUnsorted.filter((b) => b.data.draft !== true);
const postsSortedByDateDesc = postsUnsorted.toSorted(
const postsSortedByDateDesc = postsUnsorted.sort(
(a, b) => b.data.date.getTime() - a.data.date.getTime()
);
Expand Down

0 comments on commit 37ce11f

Please sign in to comment.