From fe81fcf33265b47701c05fc326701fcb1e4ffe27 Mon Sep 17 00:00:00 2001 From: azivner Date: Sat, 23 Dec 2017 23:22:27 -0500 Subject: [PATCH] fix go to internal note link --- public/javascripts/link.js | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/public/javascripts/link.js b/public/javascripts/link.js index 0723fc885..046d850a8 100644 --- a/public/javascripts/link.js +++ b/public/javascripts/link.js @@ -42,7 +42,7 @@ const link = (function() { e.preventDefault(); const linkEl = $(e.target); - const notePath = linkEl.attr("note-path") ? linkEl.attr("note-path") : linkEl.attr('href'); + const notePath = linkEl.attr("note-path") ? linkEl.attr("note-path") : getNotePathFromLink(linkEl.attr('href')); if (!notePath) { return; @@ -54,13 +54,7 @@ const link = (function() { return; } - const noteId = getNotePathFromLink(notePath); - - if (!noteId) { - return; - } - - noteTree.activateNode(noteId); + noteTree.activateNode(notePath); // this is quite ugly hack, but it seems like we can't close the tooltip otherwise $("[role='tooltip']").remove();