mirror of
https://github.com/lostpaul/obsidian-folder-notes.git
synced 2026-07-22 07:40:24 +00:00
Update main.ts
This commit is contained in:
parent
8b49f3e38d
commit
73fb4c6eb2
1 changed files with 3 additions and 0 deletions
|
|
@ -166,6 +166,7 @@ export default class FolderNotesPlugin extends Plugin {
|
|||
const path = folder + '/' + event.target.innerText + '.md';
|
||||
|
||||
if (this.app.vault.getAbstractFileByPath(path)) {
|
||||
event.target.classList.remove('has-not-folder-note');
|
||||
event.target.classList.add('has-folder-note');
|
||||
this.openFolderNote(path);
|
||||
if (!this.settings.hideFolderNote) return;
|
||||
|
|
@ -188,10 +189,12 @@ export default class FolderNotesPlugin extends Plugin {
|
|||
}
|
||||
});
|
||||
} else {
|
||||
event.target.classList.remove('has-folder-note');
|
||||
event.target.onclick = null;
|
||||
event.target.click();
|
||||
}
|
||||
} else {
|
||||
event.target.classList.remove('has-folder-note');
|
||||
event.target.onclick = null;
|
||||
event.target.click();
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue