Correctly check if reader chapter exists

As explained in c70287363a8e9308fc294baf83c5656a21a479b1, the "chapterSourceOrder" does not start at 0, thus, in case it's the last known chapter, "doesChapterExist" was always false due to subtracting 1 of the total chapters
This commit is contained in:
schroda
2024-12-31 13:57:01 +01:00
parent 899364ac85
commit 83e8a5fec1

View File

@@ -163,7 +163,7 @@ const BaseReader = ({
!chaptersResponse.loading && !chaptersResponse.loading &&
!chaptersResponse.error && !chaptersResponse.error &&
chapterSourceOrder >= 0 && chapterSourceOrder >= 0 &&
chapterSourceOrder <= chapters.length - 1; chapterSourceOrder <= chapters.length;
const isLoading = const isLoading =
!areSettingsSet || !areSettingsSet ||