diff --git a/main.ts b/main.ts index c8030b8..05d6a1b 100644 --- a/main.ts +++ b/main.ts @@ -168,7 +168,7 @@ export default class Opener extends Plugin { // - tab is linked to another tab (group), see issue #9 let openElsewhere = false; const sameFile = file.path == app.workspace.getActiveFile()?.path; - const previewMode = openState?.state?.mode === 'preview'; + const previewMode = !!openState?.state?.mode; if (sameFile || previewMode || this.group) { oldopenFile && oldopenFile.apply(this, [file, openState]); return;