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) {
|
||||
event.preventDefault();
|
||||
if (this.isActiveFileStoppable()) {
|
||||
if (this.isActiveFileStoppable() && this.websocket) {
|
||||
this.websocket.send(JSON.stringify({'cmd': 'client_kill'}));
|
||||
this.killWebsocket();
|
||||
this.cleanUpUI();
|
||||
|
Reference in New Issue
Block a user