mirror of
https://github.com/zadam/trilium.git
synced 2024-09-20 15:45:58 +08:00
fixed switching between note clones
This commit is contained in:
parent
664a87cdd5
commit
550bb77ca9
|
@ -42,20 +42,24 @@ const link = (function() {
|
|||
e.preventDefault();
|
||||
|
||||
const linkEl = $(e.target);
|
||||
const address = linkEl.attr("note-path") ? linkEl.attr("note-path") : linkEl.attr('href');
|
||||
let notePath = linkEl.attr("note-path");
|
||||
|
||||
if (!address) {
|
||||
return;
|
||||
if (!notePath) {
|
||||
const address = linkEl.attr("note-path") ? linkEl.attr("note-path") : linkEl.attr('href');
|
||||
|
||||
if (!address) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (address.startsWith('http')) {
|
||||
window.open(address, '_blank');
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
notePath = getNotePathFromLink(address);
|
||||
}
|
||||
|
||||
if (address.startsWith('http')) {
|
||||
window.open(address, '_blank');
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
const notePath = getNotePathFromLink(address);
|
||||
|
||||
noteTree.activateNode(notePath);
|
||||
|
||||
// this is quite ugly hack, but it seems like we can't close the tooltip otherwise
|
||||
|
|
Loading…
Reference in a new issue