Skip to content

Commit

Permalink
Merge branch 'master' of github.com:lukeleppan/better-word-count
Browse files Browse the repository at this point in the history
  • Loading branch information
lukeleppan committed Jan 24, 2023
2 parents 113c9ed + 07cdeff commit 6676fc6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ export default class BetterWordCount extends Plugin {

giveEditorPlugin(leaf: WorkspaceLeaf): void {
//@ts-expect-error, not typed
const editor = leaf.view.editor;
const editor = leaf?.view?.editor;
if (editor) {
const editorView = editor.cm as EditorView;
const editorPlug = editorView.plugin(editorPlugin);
Expand Down

0 comments on commit 6676fc6

Please sign in to comment.