From 4eda7a69fd1483fdd62ca52fabe223d362c2f96f Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Fri, 26 Mar 2021 22:40:29 +0530 Subject: [PATCH] Fix #1921530 [Private bug](https://bugs.launchpad.net/calibre/+bug/1921530) --- src/pyj/read_book/view.pyj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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