Skip to content

Commit

Permalink
fix: display correct percentages for multiple choice polls (#1821)
Browse files Browse the repository at this point in the history
  • Loading branch information
zaidhaan authored Feb 24, 2023
1 parent 958f596 commit 8c78320
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion components/status/StatusPoll.vue
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ const votersCount = $computed(() => poll.votersCount ?? poll.votesCount ?? 0)
<div
v-for="(option, index) of poll.options"
:key="index" py-1 relative
:style="{ '--bar-width': toPercentage((option.votesCount || 0) / poll.votesCount) }"
:style="{ '--bar-width': toPercentage((option.votesCount || 0) / votersCount) }"
>
<div flex justify-between pb-2 w-full>
<span inline-flex align-items>
Expand Down

0 comments on commit 8c78320

Please sign in to comment.