From 2dede2a051db60d746e24e8328c14c594ea69631 Mon Sep 17 00:00:00 2001 From: Kalle <38327916+Sendouc@users.noreply.github.com> Date: Sun, 6 Oct 2024 11:48:04 +0300 Subject: [PATCH] Fix DE standings crash when not enough teams --- app/features/tournament-bracket/core/Bracket.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/features/tournament-bracket/core/Bracket.ts b/app/features/tournament-bracket/core/Bracket.ts index 18926c3d6..66e9a50c2 100644 --- a/app/features/tournament-bracket/core/Bracket.ts +++ b/app/features/tournament-bracket/core/Bracket.ts @@ -543,6 +543,8 @@ class DoubleEliminationBracket extends Bracket { } get standings(): Standing[] { + if (!this.enoughTeams) return []; + const losersGroupId = this.data.group.find((g) => g.number === 2)?.id; const teams: { id: number; lostAt: number }[] = [];