From 272b2b8d27dd8a5376af15567bfffe842a37d884 Mon Sep 17 00:00:00 2001 From: slonkazoid Date: Thu, 1 Aug 2024 00:52:29 +0300 Subject: [PATCH] fix sorting --- static/main.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/static/main.js b/static/main.js index f99ea13..6a00b13 100644 --- a/static/main.js +++ b/static/main.js @@ -9,7 +9,7 @@ function initialSort(source, target) { let title = post.firstElementChild.innerText; posts.push([title, post.cloneNode(true)]); } - posts.sort(([a, _1], [b, _2]) => a.toLocaleLowerCase() > b.toLocaleLowerCase()); + posts.sort(([a, _1], [b, _2]) => a.toLocaleLowerCase().localeCompare(b.toLocaleLowerCase())); for (let [_, post] of posts) { target.appendChild(post); }