Fix being able to report bracket reset scores after grand final is over

This commit is contained in:
Kalle 2024-10-06 13:05:32 +03:00
parent 0a6b88e574
commit b1fb4a20a3

View File

@ -501,7 +501,13 @@ export class BaseGetter {
roundNumber: number,
roundCount: number,
): Match[] {
if (roundNumber === roundCount) return [];
if (
roundNumber === roundCount ||
// avoid putting teams to bracket reset if tournament is over
match.opponent1?.result === "win"
) {
return [];
}
return [this.findMatch(match.group_id, roundNumber + 1, 1)];
}