Hotfix reopen

This commit is contained in:
Kalle 2024-04-14 22:10:00 +03:00
parent df950c6033
commit d00f182d90

View File

@ -782,7 +782,12 @@ export class Tournament {
invariant(bracket, "Bracket not found");
const hasInProgressFollowUpBracket = this.brackets.some(
(b) => !b.preview && b.sources?.some((s) => s.bracketIdx === bracketIdx),
(b) =>
!b.preview &&
b.sources?.some((s) => s.bracketIdx === bracketIdx) &&
b.data.participant.some(
(p) => p.id === match.opponent1?.id || p.id === match.opponent2?.id,
),
);
if (hasInProgressFollowUpBracket) return false;