Ensure to always have one page in reader

Reapplies if from 2c4a17b32f

Regression from 4a9d2903b8
This commit is contained in:
schroda
2025-02-12 20:43:09 +01:00
parent ffd6c5867f
commit c5b7e89fb4

View File

@@ -48,7 +48,7 @@ export const useReaderSetPagesState = (
}
const { pages: pagesFromResponse } = pagesPayload;
const newPages = pages.length ? pagesFromResponse : [''];
const newPages = pagesFromResponse.length ? pagesFromResponse : [''];
const initialReaderPageIndex = getInitialReaderPageIndex(resumeMode, lastPageRead ?? 0, newPages.length - 1);
const didPagesChange = previousPageData.current !== pagesPayload?.pages;