mirror of
https://github.com/zadam/trilium.git
synced 2025-11-12 16:25:51 +01:00
detect existing attachment in target note
This commit is contained in:
@@ -132,7 +132,7 @@ export default class AddLinkDialog extends BasicWidget {
|
||||
|
||||
this.updateTitleSettingsVisibility();
|
||||
|
||||
const noteId = treeService.getNoteIdFromNotePath(suggestion.notePath);
|
||||
const noteId = treeService.getNoteIdFromUrl(suggestion.notePath);
|
||||
|
||||
if (noteId) {
|
||||
setDefaultLinkTitle(noteId);
|
||||
@@ -154,7 +154,7 @@ export default class AddLinkDialog extends BasicWidget {
|
||||
this.$linkTitle.val(suggestion.externalLink)
|
||||
}
|
||||
else {
|
||||
const noteId = treeService.getNoteIdFromNotePath(suggestion.notePath);
|
||||
const noteId = treeService.getNoteIdFromUrl(suggestion.notePath);
|
||||
|
||||
if (noteId) {
|
||||
setDefaultLinkTitle(noteId);
|
||||
|
||||
Reference in New Issue
Block a user