Skip to content

Commit

Permalink
improve: checkbox option (#261)
Browse files Browse the repository at this point in the history
  • Loading branch information
Himali-Malvawala authored Apr 10, 2024
1 parent 0225c45 commit f3a7ef4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/forms/components/FormSubmissions.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ export const FormSubmissions: React.FC<Props> = (props) => {
const key: string = Object.keys(resultValue)[0];
if (question.fieldType === "Checkbox") {
const splitAnswer = answer?.value?.split(",");
if (splitAnswer.indexOf(key) > -1) resultValue[key] = resultValue[key] + 1;
if (splitAnswer?.indexOf(key) > -1) resultValue[key] = resultValue[key] + 1;
} else {
if (key === answer?.value) resultValue[key] = resultValue[key] + 1;
}
Expand Down

0 comments on commit f3a7ef4

Please sign in to comment.