Show error for chapter without pages

This commit is contained in:
schroda
2024-06-27 15:09:13 +02:00
parent c337ec09ea
commit dd6b0a1e44
2 changed files with 5 additions and 0 deletions

View File

@@ -734,6 +734,7 @@
"error": {
"label": {
"next_chapter_does_not_exist": "There is no next chapter to open",
"no_pages_found": "No pages found",
"prev_chapter_does_not_exist": "There is no previous chapter to open"
}
},

View File

@@ -503,6 +503,10 @@ export function Reader() {
);
}
if (!chapter.pageCount) {
return <EmptyViewAbsoluteCentered message={t('reader.error.label.no_pages_found')} retry={doFetchPages} />;
}
const pages = range(chapter.pageCount).map((index) => ({
index,
src: requestManager.getChapterPageUrl(mangaId, chapterIndex, index),