Fix active file class getting applied to non folder note folders

This commit is contained in:
Lost Paul 2024-01-27 13:10:59 +01:00
parent 77700797a2
commit 841b4e211b

View file

@ -210,7 +210,9 @@ export default class FolderNotesPlugin extends Plugin {
const folder = getFolder(this, openFile);
if (!folder) { return; }
const folderNote = getFolderNote(this, folder.path);
if (!folderNote) { return; }
if (folderNote.path !== openFile.path) { return; }
this.activeFolderDom = this.getEL(folder.path);
if (this.activeFolderDom) this.activeFolderDom.addClass('fn-is-active');
}));