[FIX] current correct answers recorded incorrectly
This commit is contained in:
@@ -611,10 +611,9 @@ exports.processAnswer = functions.https.onCall((data, context) => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (!prevCorrect) {
|
if (!prevCorrect) {
|
||||||
docData.current_correct = [splitCorrectAnswers[correctAnswerIndex]];
|
docData.current_correct = [notDoneSplitCorrectAnswers[correctAnswerIndex]];
|
||||||
// } else if (!prevCorrect.includes(splitCorrectAnswers[correctAnswerIndex])) {
|
|
||||||
} else if (correctAnswerIndex < notDoneSplitCorrectAnswers.length) {
|
} else if (correctAnswerIndex < notDoneSplitCorrectAnswers.length) {
|
||||||
docData.current_correct.push(splitCorrectAnswers[correctAnswerIndex]);
|
docData.current_correct.push(notDoneSplitCorrectAnswers[correctAnswerIndex]);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (docData.current_correct.length === splitCorrectAnswers.length) {
|
if (docData.current_correct.length === splitCorrectAnswers.length) {
|
||||||
|
|||||||
Reference in New Issue
Block a user