Fix crash when underground bracket & byes in losers

This commit is contained in:
Kalle
2024-02-10 14:59:30 +02:00
parent 700c176f18
commit d5246965d5

View File

@@ -450,6 +450,10 @@ class DoubleEliminationBracket extends Bracket {
);
for (const match of roundsMatches) {
// BYE
if (!match.opponent1 || !match.opponent2) {
continue;
}
if (
match.opponent1?.result !== "win" &&
match.opponent2?.result !== "win"