fix tooltip

This commit is contained in:
azivner
2017-12-17 17:37:19 -05:00
parent 125012cba7
commit f96e38fd13
3 changed files with 6 additions and 4 deletions

View File

@@ -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));
}
},