fix: use Array.isArray guard instead of unsafe cast in MultipleSelect

This commit is contained in:
LaurensBartelds committed 2026-04-21 21:40:41 +02:00
1 parent 535434421a
commit 2a59f13870
1 file changed
+1 -1
@@ -15,7 +15,7 @@ export default function MultipleSelect({ q, value, onChange, locked, graded }: P
if (locked) return
onChange(current.includes(id) ? current.filter((v) => v !== id) : [...current, id])
}
const answerSet = new Set((q.answer as string[]) ?? [])
const answerSet = new Set(Array.isArray(q.answer) ? q.answer : [])
return (
<div className="choices">