Skip to content

Commit

Permalink
change check from in to includes
Browse files Browse the repository at this point in the history
  • Loading branch information
Dankco committed Feb 24, 2024
1 parent 62d43ae commit 4c8d5a4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/components/RunCode.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ const RunCode: React.FC<RunCodeProps> = ({ displayText, questions }) => {
if (question.answer !== undefined) {
temp[index] = selections[index] == question.answer;
} else if (question.answers !== undefined) {
temp[index] = selections[index] in question.answers;
temp[index] = question.answers.includes(selections[index]);
}
});
setAnswers([...temp]);
Expand Down

0 comments on commit 4c8d5a4

Please sign in to comment.