From a5f66044e1bc5a689e72349705721380436f1127 Mon Sep 17 00:00:00 2001 From: 0x1eef <0x1eef@protonmail.com> Date: Sat, 31 Aug 2024 00:46:48 -0300 Subject: [PATCH] Update sort --- src/js/loaders/SurahIndexLoader.ts | 2 +- src/js/loaders/SurahStreamLoader.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/js/loaders/SurahIndexLoader.ts b/src/js/loaders/SurahIndexLoader.ts index 9ade0bd0b..5cbed7a8c 100644 --- a/src/js/loaders/SurahIndexLoader.ts +++ b/src/js/loaders/SurahIndexLoader.ts @@ -35,7 +35,7 @@ import { formatNumber } from "~/lib/t"; pkg.fonts.forEach((f) => document.fonts.add(f)); pkg.css.forEach((s) => document.head.appendChild(s)); pkg.scripts - .sort((s) => Number(s.id)) + .sort((a,b) => Number(a.id) - Number(b.id)) .forEach((s) => { document.body.removeChild(document.body.appendChild(s)); }); diff --git a/src/js/loaders/SurahStreamLoader.ts b/src/js/loaders/SurahStreamLoader.ts index c31498f42..12a4dde2a 100644 --- a/src/js/loaders/SurahStreamLoader.ts +++ b/src/js/loaders/SurahStreamLoader.ts @@ -42,7 +42,7 @@ import { formatNumber } from "~/lib/t"; pkg.css.forEach((s) => document.head.appendChild(s)); pkg.json.forEach((o) => document.body.appendChild(o)); pkg.scripts - .sort((s) => Number(s.id)) + .sort((a,b) => Number(a.id) - Number(b.id)) .forEach((s) => { document.body.removeChild(document.body.appendChild(s)); });