From cceb709d1382071c1089ff7c2e458d180515fd09 Mon Sep 17 00:00:00 2001 From: Arnaldo Piccinelli Date: Wed, 10 Aug 2022 13:52:24 -0400 Subject: [PATCH] #71 Revert to original code, but with default legacyEditor = false. --- src/ObsidianZoomPlugin.ts | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/ObsidianZoomPlugin.ts b/src/ObsidianZoomPlugin.ts index 1886b78..f2c4f49 100644 --- a/src/ObsidianZoomPlugin.ts +++ b/src/ObsidianZoomPlugin.ts @@ -140,8 +140,12 @@ export default class ObsidianZoomPlugin extends Plugin { } private isLegacyEditorEnabled() { - // eslint-disable-next-line @typescript-eslint/no-explicit-any - const config = (this.app.vault as any).config; - return (!("legacyEditor" in config) && true) || config.legacyEditor; + const config: { legacyEditor: boolean } = { + legacyEditor: false, + // eslint-disable-next-line @typescript-eslint/no-explicit-any + ...(this.app.vault as any).config, + }; + + return config.legacyEditor; } }