From 0093ebf18fc0cb08d0f70b80bac386a26ff96015 Mon Sep 17 00:00:00 2001 From: ccd0 Date: Wed, 17 Jul 2019 13:56:33 -0700 Subject: [PATCH] Fix error thrown when navigating to nonexistent page. --- src/General/Index.coffee | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/General/Index.coffee b/src/General/Index.coffee index 4399a841e..7164acd18 100644 --- a/src/General/Index.coffee +++ b/src/General/Index.coffee @@ -553,9 +553,9 @@ Index = else strong = $.el 'strong' - a = pagesRoot.children[pageNum - 1] - $.before a, strong - $.add strong, a + if (a = pagesRoot.children[pageNum - 1]) + $.before a, strong + $.add strong, a updateHideLabel: -> return unless Index.hideLabel