summaryrefslogtreecommitdiff
path: root/app/assets/javascripts/ide/lib/editor.js
diff options
context:
space:
mode:
Diffstat (limited to 'app/assets/javascripts/ide/lib/editor.js')
-rw-r--r--app/assets/javascripts/ide/lib/editor.js6
1 files changed, 4 insertions, 2 deletions
diff --git a/app/assets/javascripts/ide/lib/editor.js b/app/assets/javascripts/ide/lib/editor.js
index 2b12230c7cd..493dedcd89a 100644
--- a/app/assets/javascripts/ide/lib/editor.js
+++ b/app/assets/javascripts/ide/lib/editor.js
@@ -157,8 +157,10 @@ export default class Editor {
}
updateDimensions() {
- this.instance.layout();
- this.updateDiffView();
+ if (this.instance) {
+ this.instance.layout();
+ this.updateDiffView();
+ }
}
setPosition({ lineNumber, column }) {