Fix reader missing chapter transition warning

Regression 61471ae214
This commit is contained in:
schroda
2025-05-31 18:28:28 +02:00
parent 68119504e5
commit d7c185887b

View File

@@ -447,6 +447,6 @@ export class Chapters {
const higherChapterNumber = Math.max(chapterA.chapterNumber, chapterB.chapterNumber); const higherChapterNumber = Math.max(chapterA.chapterNumber, chapterB.chapterNumber);
const lowerChapterNumber = Math.min(chapterA.chapterNumber, chapterB.chapterNumber); const lowerChapterNumber = Math.min(chapterA.chapterNumber, chapterB.chapterNumber);
return Math.floor(higherChapterNumber) - Math.floor(lowerChapterNumber) - 1; return Math.max(0, Math.floor(higherChapterNumber) - Math.floor(lowerChapterNumber) - 1);
} }
} }