Skip to content

Build your personal knowledge base with Trilium Notes

fix broken history navigation

zadam15eaf67189f4
diff --git a/src/public/javascripts/services/tree.js b/src/public/javascripts/services/tree.js
index f5a77e467f..79ece2d727 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);