Skip to content

Commit

Permalink
vslinko#71 Revert to original code, but with default legacyEditor = f…
Browse files Browse the repository at this point in the history
…alse.
  • Loading branch information
arnaldop committed Aug 10, 2022
1 parent cc8ab96 commit cceb709
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions src/ObsidianZoomPlugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}

0 comments on commit cceb709

Please sign in to comment.