fix: avoid mutating shared arrays in changelog and comments sync

This commit is contained in:
Jun Hyeok Lee 2026-04-01 23:03:52 +09:00
parent b1631cd6f1
commit a42d4d219b
2 changed files with 4 additions and 3 deletions

View file

@ -29,7 +29,7 @@ interface ChangelogPageItem {
export default async function ChangelogPage() {
const allPages = source.getPages() as ChangelogPageItem[];
const sortedChangelogs = allPages.sort((a, b) => {
const sortedChangelogs = allPages.toSorted((a, b) => {
const dateA = new Date(a.data.date).getTime();
const dateB = new Date(b.data.date).getTime();
return dateB - dateA;