From 44274b3f09005bdf5170c38176a064cdf9b0ef20 Mon Sep 17 00:00:00 2001 From: Ramon Wenger Date: Wed, 14 Oct 2020 18:53:03 +0200 Subject: [PATCH] Handle questions without correct answer set --- client/src/helpers/survey-solutions.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/client/src/helpers/survey-solutions.js b/client/src/helpers/survey-solutions.js index 685cf578..7d02c80f 100644 --- a/client/src/helpers/survey-solutions.js +++ b/client/src/helpers/survey-solutions.js @@ -1,4 +1,7 @@ const extractAnswerFromQuestion = (previous, question) => { + if (!question.correctAnswer) { + return [...previous]; + } let answer = question.correctAnswer; if (question.getType() === 'matrix') { const correctAnswer = question.correctAnswer;