From 78c0efcd2089fba185b67e99f94e0e93ddbc9e39 Mon Sep 17 00:00:00 2001 From: schroda <50052685+schroda@users.noreply.github.com> Date: Sun, 30 Jun 2024 13:33:31 +0200 Subject: [PATCH] Sort chapter list by source order Was incorrectly changed to chapter number with f52b634da130a5bbbb9ddf5a9c4c69a7dea6fa43 --- src/components/chapter/util.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/chapter/util.tsx b/src/components/chapter/util.tsx index b5648c80..8d52747a 100644 --- a/src/components/chapter/util.tsx +++ b/src/components/chapter/util.tsx @@ -91,7 +91,7 @@ export function filterAndSortChapters(chapters: TChapter[], options: ChapterList const sorted = options.sortBy === 'fetchedAt' ? filtered.toSorted((a, b) => Number(a.fetchedAt ?? 0) - Number(b.fetchedAt ?? 0)) - : filtered.toSorted((a, b) => a.chapterNumber - b.chapterNumber); + : filtered.toSorted((a, b) => a.sourceOrder - b.sourceOrder); if (options.reverse) { sorted.reverse(); }