Check for this.active_frame.data() before accessing
This commit is contained in:
@ -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();
|
||||||
},
|
},
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user