Skip to content

Commit

Permalink
Fix active file class getting applied to non folder note folders
Browse files Browse the repository at this point in the history
  • Loading branch information
LostPaul committed Jan 27, 2024
1 parent 7770079 commit 841b4e2
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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');
}));
Expand Down

0 comments on commit 841b4e2

Please sign in to comment.