diff --git a/public/javascripts/init.js b/public/javascripts/init.js index 3fb83f5ff..e07f47521 100644 --- a/public/javascripts/init.js +++ b/public/javascripts/init.js @@ -93,9 +93,11 @@ $.ui.autocomplete.filter = (array, terms) => { $(document).tooltip({ items: "#note-detail a", content: function(callback) { - const noteId = link.getNotePathFromLink($(this).attr("href")); + const notePath = link.getNotePathFromLink($(this).attr("href")); + + if (notePath !== null) { + const noteId = treeUtils.getNoteIdFromNotePath(notePath); - if (noteId !== null) { noteEditor.loadNote(noteId).then(note => callback(note.detail.note_text)); } }, diff --git a/public/javascripts/link.js b/public/javascripts/link.js index b77aa6754..6141d06aa 100644 --- a/public/javascripts/link.js +++ b/public/javascripts/link.js @@ -2,7 +2,7 @@ const link = (function() { function getNotePathFromLink(url) { - const notePathMatch = /app#([A-Za-z0-9/]+)$/.exec(url); + const notePathMatch = /#([A-Za-z0-9/]+)$/.exec(url); if (notePathMatch === null) { return null; diff --git a/services/build.js b/services/build.js index c81431f8b..6e95d8ecc 100644 --- a/services/build.js +++ b/services/build.js @@ -1 +1 @@ -module.exports = { build_date:"2017-12-16T21:37:48-05:00", build_revision: "ccc7775c7cff5cdfcad1102ec6ca1ab15612c851" }; +module.exports = { build_date:"2017-12-17T16:57:13-05:00", build_revision: "125012cba779086e526fa763cb0bfde59451fda6" };