From 35a7df2cd1999430249fa1f2e5792c1486c5d87b Mon Sep 17 00:00:00 2001 From: Jaifroid Date: Wed, 8 Apr 2020 07:44:01 +0100 Subject: [PATCH] Fix failure to load main article when using history.back() Former-commit-id: a92f8dd9a5ae197d0f937fa38b4b392cfee185e9 [formerly 22b02ba6535469d783178d8bf07e8833d7fc5437] Former-commit-id: a3ccb9dad4c511d71498290ac3c875a1b5f25b50 --- www/js/app.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/www/js/app.js b/www/js/app.js index ae7e2fba..cff0907e 100644 --- a/www/js/app.js +++ b/www/js/app.js @@ -3517,6 +3517,10 @@ define(['jquery', 'zimArchiveLoader', 'uiUtil', 'util', 'utf8', 'images', 'cooki //This removes any search highlighting clearFindInArticle(); document.getElementById('searchingArticles').style.display = 'block'; + if (~title.indexOf(params.cachedStartPage)) { + goToMainArticle(); + return; + } state.selectedArchive.getDirEntryByTitle(title).then(function (dirEntry) { if (dirEntry === null || dirEntry === undefined) { document.getElementById('searchingArticles').style.display = 'none';