diff --git a/packages/docusaurus-theme-classic/src/theme/BlogArchivePage/index.tsx b/packages/docusaurus-theme-classic/src/theme/BlogArchivePage/index.tsx index 82150becd3eea..28613c6a462ac 100644 --- a/packages/docusaurus-theme-classic/src/theme/BlogArchivePage/index.tsx +++ b/packages/docusaurus-theme-classic/src/theme/BlogArchivePage/index.tsx @@ -54,7 +54,7 @@ function YearsSection({years}: {years: YearProp[]}) { } function listPostsByYears(blogPosts: readonly ArchiveBlogPost[]): YearProp[] { - const postsByYear = blogPosts.reduceRight((posts, post) => { + const postsByYear = blogPosts.reduce((posts, post) => { const year = post.metadata.date.split('-')[0]!; const yearPosts = posts.get(year) ?? []; return posts.set(year, [post, ...yearPosts]);