Handle undefined this.websocket
when stopping code
Fixes CODEOCEAN-CJ
This commit is contained in:

committed by
Sebastian Serth

parent
214aae2644
commit
2f622174fa
@ -148,7 +148,7 @@ CodeOceanEditorEvaluation = {
|
|||||||
*/
|
*/
|
||||||
stopCode: function (event) {
|
stopCode: function (event) {
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
if (this.isActiveFileStoppable()) {
|
if (this.isActiveFileStoppable() && this.websocket) {
|
||||||
this.websocket.send(JSON.stringify({'cmd': 'client_kill'}));
|
this.websocket.send(JSON.stringify({'cmd': 'client_kill'}));
|
||||||
this.killWebsocket();
|
this.killWebsocket();
|
||||||
this.cleanUpUI();
|
this.cleanUpUI();
|
||||||
|
Reference in New Issue
Block a user