Return if editor is not defined
Fixes CODEOCEAN-FRONTEND-3A
This commit is contained in:

committed by
Sebastian Serth

parent
51fc44c2da
commit
d224a099e0
@ -1011,7 +1011,10 @@ var CodeOceanEditor = {
|
|||||||
},
|
},
|
||||||
|
|
||||||
applyChanges: function (delta, active_file) {
|
applyChanges: function (delta, active_file) {
|
||||||
const editor = this.editor_for_file.get(active_file.id)
|
const editor = this.editor_for_file.get(active_file.id);
|
||||||
|
if (editor === undefined) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
editor.session.doc.applyDeltas([delta]);
|
editor.session.doc.applyDeltas([delta]);
|
||||||
},
|
},
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user