From 307bc9bd7b973ef954f6bda1d3e42b8672c94713 Mon Sep 17 00:00:00 2001 From: Sebastian Serth Date: Fri, 13 Nov 2020 22:53:56 +0100 Subject: [PATCH] Check for output before accessing stderr or stdout --- app/assets/javascripts/editor/evaluation.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/assets/javascripts/editor/evaluation.js b/app/assets/javascripts/editor/evaluation.js index ad91f9fe..e603b89f 100644 --- a/app/assets/javascripts/editor/evaluation.js +++ b/app/assets/javascripts/editor/evaluation.js @@ -173,7 +173,7 @@ CodeOceanEditorEvaluation = { }, printOutput: function (output, colorize, index) { - if (output.stderr === undefined && output.stdout === undefined) { + if (output === undefined || output.stderr === undefined && output.stdout === undefined) { // Prevent empty element with no text at all return; }