Skip to content

Commit e64242c

Browse files
committed
Fix an issue in which “contested” status took priority over “win” or “lose” status
1 parent 4e9e5cb commit e64242c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/components/vote-count/useVoteData.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,9 @@ function getVoteStatus({
3636
neededToWin,
3737
}: Omit<VoteData, 'status'>): VoteStatus {
3838
if (total === 0) return 'loading';
39-
if (yes + no + contested === total && contested > 0) return 'contested';
4039
if (yes >= neededToWin) return 'win';
4140
if (no >= neededToWin) return 'loss';
41+
if (yes + no + contested === total && contested > 0) return 'contested';
4242
return 'beforeResult';
4343
}
4444

0 commit comments

Comments
 (0)