From aac6827a38916436fde5bd93646fbdfd85c07414 Mon Sep 17 00:00:00 2001 From: tamiroh Date: Mon, 11 Sep 2023 19:43:59 +0900 Subject: [PATCH] Update main.ts Co-authored-by: Vinzent --- src/main.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main.ts b/src/main.ts index e1db728c..b190e233 100644 --- a/src/main.ts +++ b/src/main.ts @@ -1251,7 +1251,7 @@ export default class ObsidianGit extends Plugin { this.app.workspace.iterateAllLeaves((leaf) => { if ( leaf.view instanceof MarkdownView && - (leaf.view.file as any).path == file.path + leaf.view.file?.path == file.path ) { leaf.detach(); }