Handle questions without correct answer set

This commit is contained in:
Ramon Wenger 2020-10-14 18:53:03 +02:00
parent 0e166a6b10
commit 44274b3f09
1 changed files with 3 additions and 0 deletions

View File

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