diff --git a/src/pyj/read_book/view.pyj b/src/pyj/read_book/view.pyj index 0789960f2d..b478707874 100644 --- a/src/pyj/read_book/view.pyj +++ b/src/pyj/read_book/view.pyj @@ -1095,7 +1095,7 @@ class View: if not self.book or not self.book.manifest: return index, refnum = reference.split('.') - index, refnum = int(index), int(refnum) + index, refnum = int(index), (int(refnum) if refnum else 1) chapter_name = self.book.manifest.spine[index] if not chapter_name: return False