Skip to content

Commit

Permalink
fix: #63
Browse files Browse the repository at this point in the history
  • Loading branch information
lazyloong committed Oct 19, 2024
1 parent a613210 commit 49a3d22
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@
"author": "lazyloong",

"minAppVersion": "1.0.0",
"version": "2.27.3"
"version": "2.27.4"
}
6 changes: 4 additions & 2 deletions src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -238,11 +238,13 @@ class FileExplorerHotkey {
this.view = this.leaf.view;
}
getFiles(): TFile[] {
if (this.view === undefined) {
// @ts-ignore
if (this.view === undefined || this.view.tree === undefined) {
// core plugin `Files` is disabled
return [];
}
return Array.from((this.view as any).tree.selectedDoms).map((p: { file: TFile }) => p.file);
// @ts-ignore
return Array.from(this.view.tree.selectedDoms).map((p: { file: TFile }) => p.file);
}
}

Expand Down

0 comments on commit 49a3d22

Please sign in to comment.