diff --git a/app/assets/javascripts/editor/execution.js b/app/assets/javascripts/editor/execution.js index 01277422..6ded66d8 100644 --- a/app/assets/javascripts/editor/execution.js +++ b/app/assets/javascripts/editor/execution.js @@ -33,7 +33,7 @@ CodeOceanEditorWebsocket = { ); CodeOceanEditorWebsocket.websocket = this.websocket; this.websocket.onError(this.showWebsocketError.bind(this)); - this.websocket.onClose(span.finish.bind(span)); + this.websocket.onClose(span?.finish?.bind(span)); }, initializeSocketForTesting: function(url) {