From f2eccf96aef79612e4faae7c1f6a4dedfd46a576 Mon Sep 17 00:00:00 2001 From: Kalle <38327916+Sendouc@users.noreply.github.com> Date: Mon, 9 Dec 2024 22:04:04 +0200 Subject: [PATCH] Fix round robin prepared maps for group size >4 --- .../tournament-bracket/components/BracketMapListDialog.tsx | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/app/features/tournament-bracket/components/BracketMapListDialog.tsx b/app/features/tournament-bracket/components/BracketMapListDialog.tsx index 9f531375e..9e618c489 100644 --- a/app/features/tournament-bracket/components/BracketMapListDialog.tsx +++ b/app/features/tournament-bracket/components/BracketMapListDialog.tsx @@ -575,9 +575,10 @@ function teamCountAdjustedBracketData({ case "round_robin": // ensure a full bracket (no bye round) gets generated even if registration is underway return bracket.generateMatchesData( - nullFilledArray(TOURNAMENT.DEFAULT_TEAM_COUNT_PER_RR_GROUP).map( - (_, i) => i + 1, - ), + nullFilledArray( + bracket.settings?.teamsPerGroup ?? + TOURNAMENT.DEFAULT_TEAM_COUNT_PER_RR_GROUP, + ).map((_, i) => i + 1), ); case "single_elimination": case "double_elimination":