diff --git a/app/features/tournament-bracket/loaders/to.$id.matches.$mid.server.ts b/app/features/tournament-bracket/loaders/to.$id.matches.$mid.server.ts index 9d1650e02..06f8aed54 100644 --- a/app/features/tournament-bracket/loaders/to.$id.matches.$mid.server.ts +++ b/app/features/tournament-bracket/loaders/to.$id.matches.$mid.server.ts @@ -147,18 +147,18 @@ export const loader = async ({ params }: LoaderFunctionArgs) => { if ( match.chatCode && !matchIsOver && - match.opponentOne && - match.opponentTwo + match.opponentOne?.id && + match.opponentTwo?.id ) { // only add global chat for active roster (or all if not yet set i.e. first match) // if roster changed mid-set the subs can still see the chat on the match page - const teamAlpha = tournament.teamById(match.opponentOne.id!)!; + const teamAlpha = tournament.teamById(match.opponentOne.id)!; const teamAlphaActiveRoster = tournamentTeamToActiveRosterUserIds( teamAlpha, tournament.minMembersPerTeam, ) ?? teamAlpha.members.map((m) => m.userId); - const teamBravo = tournament.teamById(match.opponentTwo.id!)!; + const teamBravo = tournament.teamById(match.opponentTwo.id)!; const teamBravoActiveRoster = tournamentTeamToActiveRosterUserIds( teamBravo, diff --git a/e2e/tournament-bracket.spec.ts b/e2e/tournament-bracket.spec.ts index 5159d0b95..4e8facf19 100644 --- a/e2e/tournament-bracket.spec.ts +++ b/e2e/tournament-bracket.spec.ts @@ -866,7 +866,7 @@ test.describe("Tournament bracket", () => { }); test("locks/unlocks matches & sets match as casted", async ({ page }) => { - test.setTimeout(120000); + test.slow(); const tournamentId = 2;