Commit 204d78e7 authored by Mike Greiling's avatar Mike Greiling

don't reference monaco directly in RepoEditor component

parent 15993df1
...@@ -48,7 +48,7 @@ export default { ...@@ -48,7 +48,7 @@ export default {
// Compare key to allow for files opened in review mode to be cached differently // Compare key to allow for files opened in review mode to be cached differently
if (oldVal.key !== this.file.key) { if (oldVal.key !== this.file.key) {
this.initMonaco(); this.initEditor();
if (this.currentActivityView !== activityBarViews.edit) { if (this.currentActivityView !== activityBarViews.edit) {
this.setFileViewMode({ this.setFileViewMode({
...@@ -85,7 +85,7 @@ export default { ...@@ -85,7 +85,7 @@ export default {
if (!this.editor) { if (!this.editor) {
this.editor = Editor.create(); this.editor = Editor.create();
} }
this.initMonaco(); this.initEditor();
}, },
methods: { methods: {
...mapActions([ ...mapActions([
...@@ -98,7 +98,7 @@ export default { ...@@ -98,7 +98,7 @@ export default {
'updateViewer', 'updateViewer',
'removePendingTab', 'removePendingTab',
]), ]),
initMonaco() { initEditor() {
if (this.shouldHideEditor) return; if (this.shouldHideEditor) return;
this.editor.clearEditor(); this.editor.clearEditor();
...@@ -111,7 +111,7 @@ export default { ...@@ -111,7 +111,7 @@ export default {
this.createEditorInstance(); this.createEditorInstance();
}) })
.catch(err => { .catch(err => {
flash('Error setting up monaco. Please try again.', 'alert', document, null, false, true); flash('Error setting up editor. Please try again.', 'alert', document, null, false, true);
throw err; throw err;
}); });
}, },
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment