From d7c185887bd38b1b5d05ec45fcb5e554a5b796ff Mon Sep 17 00:00:00 2001 From: schroda <50052685+schroda@users.noreply.github.com> Date: Sat, 31 May 2025 18:28:28 +0200 Subject: [PATCH] Fix reader missing chapter transition warning Regression 61471ae214dd3e68a41bf76083d201d32c73baa8 --- src/modules/chapter/services/Chapters.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/modules/chapter/services/Chapters.ts b/src/modules/chapter/services/Chapters.ts index ff4c0a5a..4c53163e 100644 --- a/src/modules/chapter/services/Chapters.ts +++ b/src/modules/chapter/services/Chapters.ts @@ -447,6 +447,6 @@ export class Chapters { const higherChapterNumber = Math.max(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); } }