mirror of
https://github.com/Sendouc/sendou.ink.git
synced 2026-07-02 00:23:57 -05:00
Fix a couple crashes with prepared maps feature Closes #1862
This commit is contained in:
parent
45a6adf540
commit
2cee6a96ca
|
|
@ -546,7 +546,11 @@ function teamCountAdjustedBracketData({
|
|||
// RR & swiss are different because for those the amount of participants won't affect the amount of rounds
|
||||
case "round_robin":
|
||||
case "swiss":
|
||||
return bracket.data;
|
||||
// 10 to ensure a full bracket gets generated even if registration is underway
|
||||
return tournament.generateMatchesData(
|
||||
nullFilledArray(10).map((_, i) => i + 1),
|
||||
bracket.type,
|
||||
);
|
||||
case "single_elimination":
|
||||
return tournament.generateMatchesData(
|
||||
nullFilledArray(teamCount).map((_, i) => i + 1),
|
||||
|
|
|
|||
|
|
@ -540,6 +540,7 @@ function BracketStarter({
|
|||
close={close}
|
||||
bracket={bracket}
|
||||
bracketIdx={bracketIdx}
|
||||
key={bracketIdx}
|
||||
/>
|
||||
) : null}
|
||||
<Button
|
||||
|
|
@ -587,6 +588,7 @@ function MapPreparer({
|
|||
bracket={bracket}
|
||||
bracketIdx={bracketIdx}
|
||||
isPreparing
|
||||
key={bracketIdx}
|
||||
/>
|
||||
) : null}
|
||||
<div className="stack sm horizontal ml-auto">
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user