diff --git a/src/globals.d.ts b/src/globals.d.ts index 4b098ef..83b3166 100644 --- a/src/globals.d.ts +++ b/src/globals.d.ts @@ -21,7 +21,7 @@ interface FileExplorerWorkspaceLeaf extends WorkspaceLeaf { interface FileExplorerViewFileItem extends TAbstractFile { titleEl: HTMLElement - el: HTMLElement + selfEl: HTMLElement } interface FileExplorerView extends View { diff --git a/src/main.ts b/src/main.ts index b81245a..02d5601 100644 --- a/src/main.ts +++ b/src/main.ts @@ -297,7 +297,7 @@ export default class FolderNotesPlugin extends Plugin { if(!fileExplorer) { return null; } const fileExplorerItem = fileExplorer.view.fileItems[path]; if(!fileExplorerItem) { return null; } - if(fileExplorerItem.el) return fileExplorerItem.el; + if(fileExplorerItem.selfEl) return fileExplorerItem.selfEl; return fileExplorerItem.titleEl; }