Skip to content

Commit 6067a0b

Browse files
committed
Fix getting editor api on mount
1 parent 7294937 commit 6067a0b

File tree

1 file changed

+5
-3
lines changed
  • packages/app/src/app/overmind/effects/vscode

1 file changed

+5
-3
lines changed

packages/app/src/app/overmind/effects/vscode/index.ts

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -264,10 +264,12 @@ export class VSCodeEffect {
264264
}
265265

266266
public updateOptions(options: { readOnly: boolean }) {
267-
const editor = this.editorApi.getActiveCodeEditor();
267+
if (this.editorApi) {
268+
const editor = this.editorApi.getActiveCodeEditor();
268269

269-
if (editor) {
270-
editor.updateOptions(options);
270+
if (editor) {
271+
editor.updateOptions(options);
272+
}
271273
}
272274
}
273275

0 commit comments

Comments
 (0)