From 3cedcf5736c17ab610f54853a1032e35233ea1c8 Mon Sep 17 00:00:00 2001 From: Sebastian Serth Date: Sat, 14 Nov 2020 00:19:27 +0100 Subject: [PATCH] Check for null and undefined before accessing stderr and 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 e603b89f..30fa37c9 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 === undefined || output.stderr === undefined && output.stdout === undefined) { + if (output === undefined || output === null || output.stderr === undefined && output.stdout === undefined) { // Prevent empty element with no text at all return; }