Skip to content

Commit

Permalink
fix: latestAnswers breaking issue
Browse files Browse the repository at this point in the history
  • Loading branch information
isekovanic committed Oct 8, 2024
1 parent 29e58f1 commit 843be7a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/poll.ts
Original file line number Diff line number Diff line change
Expand Up @@ -236,9 +236,9 @@ export class Poll<SCG extends ExtendableGenerics = DefaultGenerics> {
if (ownAnswer?.id === event.poll_vote.id) {
ownAnswer = undefined;
}
maxVotedOptionIds = getMaxVotedOptionIds(event.poll.vote_counts_by_option);
}
}
if (isVoteAnswer(event.poll_vote)) {
} else if (isVoteAnswer(event.poll_vote)) {
latestAnswers = [event.poll_vote, ...latestAnswers];
} else {
maxVotedOptionIds = getMaxVotedOptionIds(event.poll.vote_counts_by_option);
Expand Down

0 comments on commit 843be7a

Please sign in to comment.