From 6ac1a6570b5e7fd050fe55b7ef2a259cd499dba9 Mon Sep 17 00:00:00 2001 From: Kyler Li <46853114+loukylor@users.noreply.github.com> Date: Tue, 27 Aug 2024 18:54:00 -0700 Subject: [PATCH] match user sort to website and client (#882) --- html/src/app.js | 20 ++------------------ 1 file changed, 2 insertions(+), 18 deletions(-) diff --git a/html/src/app.js b/html/src/app.js index d8cd8368..e8840dae 100644 --- a/html/src/app.js +++ b/html/src/app.js @@ -9582,28 +9582,12 @@ speechSynthesis.getVoices(); // ascending var compareByName = function (a, b) { - var A = String(a.name).toUpperCase(); - var B = String(b.name).toUpperCase(); - if (A < B) { - return -1; - } - if (A > B) { - return 1; - } - return 0; + return a.name.localeCompare(b.name); }; // ascending var compareByDisplayName = function (a, b) { - var A = String(a.displayName).toUpperCase(); - var B = String(b.displayName).toUpperCase(); - if (A < B) { - return -1; - } - if (A > B) { - return 1; - } - return 0; + return a.displayName.localeCompare(b.displayName); }; // descending