From b039264e3598298d3850b32b872790cc1afb0b4c Mon Sep 17 00:00:00 2001 From: Lukas Petry Date: Mon, 14 Aug 2023 22:57:22 +0200 Subject: [PATCH] :ambulance: Fix 21 --- main.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.ts b/main.ts index 3a29cf4..9297fa8 100644 --- a/main.ts +++ b/main.ts @@ -82,7 +82,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;