From be1ce532b26aea4e3e2258da78849bd245f7f78b Mon Sep 17 00:00:00 2001
From: Ruben Beltran del Rio <ruben@unlimited.pizza>
Date: Sun, 1 May 2022 15:01:50 +0200
Subject: Use tailwind, reference types

---
 .../components/language_selector/language_selector.svelte    | 12 +++++++++++-
 1 file changed, 11 insertions(+), 1 deletion(-)

(limited to 'src/lib/components/language_selector/language_selector.svelte')

diff --git a/src/lib/components/language_selector/language_selector.svelte b/src/lib/components/language_selector/language_selector.svelte
index 4e245f8..c1b8f35 100644
--- a/src/lib/components/language_selector/language_selector.svelte
+++ b/src/lib/components/language_selector/language_selector.svelte
@@ -7,7 +7,17 @@
 			code,
 			...getLangNameFromCode(code)
 		}))
-		.sort((a, b) => a.native - b.native);
+		.sort((a, b) => {
+			if (a.native > b.native) {
+				return 1;
+			}
+
+			if (a.native < b.native) {
+				return -1;
+			}
+
+			return 0;
+		});
 
 	let selected = $locale;
 
-- 
cgit 

