From d84af983231fcc3df2be230a976533c10d880ad7 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Tue, 14 Feb 2017 09:11:56 +0530 Subject: [PATCH] Fix close button on bood details not returning to book list after navigating directly to book details --- src/pyj/book_list/ui.pyj | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/pyj/book_list/ui.pyj b/src/pyj/book_list/ui.pyj index 6dae389ef0..9715c3662b 100644 --- a/src/pyj/book_list/ui.pyj +++ b/src/pyj/book_list/ui.pyj @@ -66,7 +66,10 @@ def apply_url_state(state): apply_url_state.back_from_current = def back_from_current(current_query): q = current_query - if q.panel and '^' in q.panel: - q = {k:q[k] for k in q} - q.panel = q.panel.rpartition('^')[0] + if q.panel: + if '^' in q.panel: + q = {k:q[k] for k in q} + q.panel = q.panel.rpartition('^')[0] + else: + q = {'panel':'book_list'} return q