Skip to content

Commit 5de0f8a

Browse files
committed
try and fix crash
1 parent a608c79 commit 5de0f8a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

apps/client/src/routes/room.$roomId/vote.$userId.$votingKey.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,10 +99,10 @@ function SingleQuestionVoting({ data }: { data: QuestionVotingData }) {
9999
control={control}
100100
render={({ field: { value, onChange } }) => (
101101
<>
102-
{candidatesReordered.map((candidate) => (
102+
{candidatesReordered.filter(Boolean).map((candidate) => (
103103
<Button
104104
className={twMerge(
105-
value === candidate.id ? "btn-accent" : undefined,
105+
value === candidate?.id ? "btn-accent" : undefined,
106106
)}
107107
onClick={() => {
108108
onChange(candidate.id);

0 commit comments

Comments
 (0)