Sort chapter list by source order

Was incorrectly changed to chapter number with f52b634da1
This commit is contained in:
schroda
2024-06-30 13:33:31 +02:00
parent f52b634da1
commit 78c0efcd20

View File

@@ -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();
}