Skip to content

Commit

Permalink
vslinko#71 - Legacy warning always appears.
Browse files Browse the repository at this point in the history
  • Loading branch information
arnaldop committed Aug 7, 2022
1 parent 11cfde2 commit cc8ab96
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 9 deletions.
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 3 additions & 7 deletions src/ObsidianZoomPlugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -140,12 +140,8 @@ export default class ObsidianZoomPlugin extends Plugin {
}

private isLegacyEditorEnabled() {
const config: { legacyEditor: boolean } = {
legacyEditor: true,
// eslint-disable-next-line @typescript-eslint/no-explicit-any
...(this.app.vault as any).config,
};

return config.legacyEditor;
// eslint-disable-next-line @typescript-eslint/no-explicit-any
const config = (this.app.vault as any).config;
return (!("legacyEditor" in config) && true) || config.legacyEditor;
}
}

0 comments on commit cc8ab96

Please sign in to comment.