From a7c28570ecded372ddb9cfcb71a9c2e256d56392 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Sat, 6 Jun 2020 11:58:47 +0530 Subject: [PATCH] Viewer: Fix jump to previous section not working when viewer is on last section --- src/pyj/read_book/toc.pyj | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/pyj/read_book/toc.pyj b/src/pyj/read_book/toc.pyj index 3d647653df..9a22b2a88b 100644 --- a/src/pyj/read_book/toc.pyj +++ b/src/pyj/read_book/toc.pyj @@ -58,6 +58,8 @@ def get_border_nodes(toc, id_map): after = node return True ) + if not before and prev is not None: + before = prev return before, after