This commit is contained in:
Kalle
2026-07-25 15:55:54 +03:00
parent 722b0cca53
commit 035390c4dd
2 changed files with 4 additions and 4 deletions

View File

@@ -74,7 +74,7 @@ export function setMatchResults(
}
if (currentlyCompleted) {
resetMatchResults(stored);
clearWinner(stored);
return true;
}
@@ -82,11 +82,11 @@ export function setMatchResults(
}
/**
* Resets the results of a match.
* Clears the winner of a match, marking it as not completed.
*
* @param stored A reference to what will be updated in the storage.
*/
export function resetMatchResults(stored: MatchResults): void {
export function clearWinner(stored: MatchResults): void {
stored.winnerSide = null;
}

View File

@@ -54,7 +54,7 @@ export function resetMatchResults(
)
throw Error("The match is locked.");
helpers.resetMatchResults(stored);
helpers.clearWinner(stored);
propagator.applyMatchUpdate(stored);
if (!helpers.isRoundRobin(stage) && !helpers.isSwiss(stage))