Handle chapter numbers with decimal places in gap calculation

This commit is contained in:
schroda
2025-05-25 15:34:15 +02:00
parent 640dcc4393
commit 5f982e07e0

View File

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