From 15eaf67189f44a573a91a26119d30f5e0ec8e639 Mon Sep 17 00:00:00 2001 From: zadam Date: Mon, 22 Apr 2019 17:13:24 +0200 Subject: [PATCH] fix broken history navigation --- src/public/javascripts/services/tree.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/public/javascripts/services/tree.js b/src/public/javascripts/services/tree.js index f5a77e467..79ece2d72 100644 --- a/src/public/javascripts/services/tree.js +++ b/src/public/javascripts/services/tree.js @@ -792,8 +792,9 @@ utils.bindShortcut('ctrl+.', scrollToActiveNote); $(window).bind('hashchange', async function() { if (isNotePathInAddress()) { const notePath = getHashValueFromAddress(); + const noteId = notePath.split("/").pop(); - if (notePath !== '-' && await getActiveNotePath() !== notePath) { + if (noteId !== '-' && noteId !== getActiveNode().data.noteId) { console.debug("Switching to " + notePath + " because of hash change"); activateNote(notePath);