Fix article sort problem in non-zh environment.

This commit is contained in:
liding 2024-06-10 12:43:46 +08:00
parent 83d584c529
commit 585e7eb3a6

View File

@ -36,7 +36,7 @@ const categoriedPostList: Array<CategoriedPosts> = allCategories.map((key) => {
if (postA.data.lastUpdate !== postB.data.lastUpdate) {
return postA.data.lastUpdate < postB.data.lastUpdate ? 1 : -1;
}
return postA.id.localeCompare(postB.id);
return postA.id.localeCompare(postB.id, 'zh-Hans-CN', { sensitivity: 'accent' });
}
)
: object[key].sort(