Skip to content
This repository has been archived by the owner on Aug 23, 2024. It is now read-only.

Commit

Permalink
Fixes weight sum for undefined vote
Browse files Browse the repository at this point in the history
  • Loading branch information
emmdim committed Apr 29, 2024
1 parent 99fefbb commit 7290f66
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion components/blocks/question-results.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ export const QuestionResults = (props: QuestionsResultsProps) => {
//Calculate voting weight
let totalWeightCount = BigNumber.from(0);
sortedChoices.map((choice: ChoiceResult) => {
totalWeightCount = totalWeightCount.add(choice.votes);
if (choice.votes) totalWeightCount = totalWeightCount.add(choice.votes);
});

return (
Expand Down

0 comments on commit 7290f66

Please sign in to comment.