From 5f982e07e0a1584d8479a0941ccb853d0cbf21b9 Mon Sep 17 00:00:00 2001 From: schroda <50052685+schroda@users.noreply.github.com> Date: Sun, 25 May 2025 15:34:15 +0200 Subject: [PATCH] Handle chapter numbers with decimal places in gap calculation --- 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 3e11d0a2..ff4c0a5a 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 higherChapterNumber - lowerChapterNumber - 1; + return Math.floor(higherChapterNumber) - Math.floor(lowerChapterNumber) - 1; } }