Prevent rendering when the first chapter is labeled "Chapter 0"

This commit is contained in:
troyeguo
2026-04-29 17:42:18 +08:00
parent cf37c90d47
commit 862a7799da
2 changed files with 7 additions and 1 deletions

View File

File diff suppressed because one or more lines are too long

View File

@@ -453,6 +453,12 @@ class Viewer extends React.Component<ViewerProps, ViewerState> {
) {
return;
}
if (
flattenChapters.length > 0 &&
flattenChapters[0].label === "Chapter 0"
) {
return;
}
setTimeout(async () => {
await rendition.refreshContent();
let chapters = rendition.getChapter();