diff --git a/functions/index.js b/functions/index.js index 55349b3..bd4dbea 100644 --- a/functions/index.js +++ b/functions/index.js @@ -611,10 +611,9 @@ exports.processAnswer = functions.https.onCall((data, context) => { } if (!prevCorrect) { - docData.current_correct = [splitCorrectAnswers[correctAnswerIndex]]; - // } else if (!prevCorrect.includes(splitCorrectAnswers[correctAnswerIndex])) { + docData.current_correct = [notDoneSplitCorrectAnswers[correctAnswerIndex]]; } else if (correctAnswerIndex < notDoneSplitCorrectAnswers.length) { - docData.current_correct.push(splitCorrectAnswers[correctAnswerIndex]); + docData.current_correct.push(notDoneSplitCorrectAnswers[correctAnswerIndex]); } if (docData.current_correct.length === splitCorrectAnswers.length) {