Skip to content

Commit 7e67db3

Browse files
committed
Fix check on editor when trying to change configuration file
1 parent da267eb commit 7e67db3

File tree

1 file changed

+3
-9
lines changed
  • packages/app/src/app/components/CodeEditor/VSCode

1 file changed

+3
-9
lines changed

packages/app/src/app/components/CodeEditor/VSCode/index.tsx

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1072,15 +1072,9 @@ export class VSCode extends React.Component<Props> implements Editor {
10721072
this.props.onChange(newCode, currentModuleShortid);
10731073
}
10741074

1075-
if (currentModuleShortid === this.currentModule.shortid) {
1076-
this.lint(
1077-
newCode,
1078-
currentModuleTitle,
1079-
this.editor
1080-
.getActiveCodeEditor()
1081-
.getModel()
1082-
.getVersionId()
1083-
);
1075+
const editor = this.editor.getActiveCodeEditor();
1076+
if (currentModuleShortid === this.currentModule.shortid && editor) {
1077+
this.lint(newCode, currentModuleTitle, editor.getModel().getVersionId());
10841078
}
10851079
};
10861080

0 commit comments

Comments
 (0)