fix: remove stale value check from OrderQuestion initial; guard wrong class in Match

This commit is contained in:
LaurensBartelds committed 2026-04-21 21:45:31 +02:00
1 parent e48e37ad87
commit 535bdb5a50
7 files changed
+42 -3

No files matched your search

+1 -1
View File
@@ -57,7 +57,7 @@ export default function Match({ q, value, onChange, locked, graded }: Props) {
else if (current[item.id]) cls += ' paired'
if (graded) {
if (answer[item.id] && current[item.id] === answer[item.id]) cls += ' correct'
else if (current[item.id]) cls += ' wrong'
else if (current[item.id] && answer[item.id]) cls += ' wrong'
}
const pairedRightIdx = current[item.id]
? (q.right ?? []).findIndex((x) => x.id === current[item.id])