From be9cc8790c860bd11072b706f0afcb391cc03e86 Mon Sep 17 00:00:00 2001 From: Sebastian Serth Date: Sat, 14 Nov 2020 00:26:36 +0100 Subject: [PATCH] Check for result before trying to populate score card --- app/assets/javascripts/editor/evaluation.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app/assets/javascripts/editor/evaluation.js b/app/assets/javascripts/editor/evaluation.js index 30fa37c9..cc09a16f 100644 --- a/app/assets/javascripts/editor/evaluation.js +++ b/app/assets/javascripts/editor/evaluation.js @@ -48,6 +48,10 @@ CodeOceanEditorEvaluation = { }, printScoringResult: function (result, index) { + if (result === undefined || result === null) { + return; + } + $('#results').show(); let card; if (result.file_role === 'teacher_defined_linter') {