fixed switching between note clones

This commit is contained in:
azivner 2018-01-02 20:16:17 -05:00
parent 664a87cdd5
commit 550bb77ca9

View file

@ -42,6 +42,9 @@ const link = (function() {
e.preventDefault(); e.preventDefault();
const linkEl = $(e.target); const linkEl = $(e.target);
let notePath = linkEl.attr("note-path");
if (!notePath) {
const address = linkEl.attr("note-path") ? linkEl.attr("note-path") : linkEl.attr('href'); const address = linkEl.attr("note-path") ? linkEl.attr("note-path") : linkEl.attr('href');
if (!address) { if (!address) {
@ -54,7 +57,8 @@ const link = (function() {
return; return;
} }
const notePath = getNotePathFromLink(address); notePath = getNotePathFromLink(address);
}
noteTree.activateNode(notePath); noteTree.activateNode(notePath);