Check for this.active_frame.data() before accessing

This commit is contained in:
Sebastian Serth
2020-11-11 17:46:02 +01:00
parent 807b763e49
commit 88a2558039

View File

@ -629,10 +629,16 @@ var CodeOceanEditor = {
}, },
isActiveFileBinary: function () { isActiveFileBinary: function () {
if (this.active_frame.data() === undefined) {
return false;
}
return 'binary' in this.active_frame.data(); return 'binary' in this.active_frame.data();
}, },
isActiveFileExecutable: function () { isActiveFileExecutable: function () {
if (this.active_frame.data() === undefined) {
return false;
}
return 'executable' in this.active_frame.data(); return 'executable' in this.active_frame.data();
}, },