Skip to content

Build your personal knowledge base with Trilium Notes

fix tooltip

azivnerf96e38fd1315
diff --git a/public/javascripts/init.js b/public/javascripts/init.js
index 3fb83f5ffe..e07f47521c 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 b77aa67541..6141d06aaa 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 c81431f8b9..6e95d8eccb 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" };