Skip to content

Commit 3dccb96

Browse files
committed
Check for active editor
1 parent 3aa4383 commit 3dccb96

File tree

1 file changed

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

1 file changed

+3
-8
lines changed

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

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1059,14 +1059,9 @@ class MonacoEditor extends React.Component<Props, State> implements Editor {
10591059
const { markers, version } = event.data;
10601060

10611061
requestAnimationFrame(() => {
1062-
if (this.editor.getActiveCodeEditor().getModel()) {
1063-
if (
1064-
version ===
1065-
this.editor
1066-
.getActiveCodeEditor()
1067-
.getModel()
1068-
.getVersionId()
1069-
) {
1062+
const activeEditor = this.editor.getActiveCodeEditor();
1063+
if (activeEditor && activeEditor.getModel()) {
1064+
if (version === activeEditor.getModel().getVersionId()) {
10701065
this.updateLintWarnings(markers);
10711066
} else {
10721067
this.updateLintWarnings([]);

0 commit comments

Comments
 (0)