Check for output before accessing stderr or stdout

This commit is contained in:
Sebastian Serth
2020-11-13 22:53:56 +01:00
parent 5fe1590b39
commit 307bc9bd7b

View File

@ -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;
}