Fix incorrect score decrement when reopening play-all matches (#2769)

Co-authored-by: Claude <noreply@anthropic.com>
This commit is contained in:
Kalle 2026-01-26 18:34:54 +02:00 committed by GitHub
parent a9dfb0c2df
commit a1257b7c00
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -493,7 +493,7 @@ export const action: ActionFunction = async ({ params, request }) => {
invariant(scoreOne !== scoreTwo, "Scores are equal");
invariant(lastResult, "Last result is missing");
if (scoreOne > scoreTwo) {
if (lastResult.winnerTeamId === match.opponentOne?.id) {
scores[0]--;
} else {
scores[1]--;