From 34c43da2f366d72a4eb0e7eedbcfd8f366535b3a Mon Sep 17 00:00:00 2001 From: Kalle <38327916+Sendouc@users.noreply.github.com> Date: Sun, 5 Jan 2025 11:29:27 +0200 Subject: [PATCH] Fix member removing in 1v1, 2v2 & 3v3 tournaments --- app/features/tournament/actions/to.$id.admin.server.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/features/tournament/actions/to.$id.admin.server.ts b/app/features/tournament/actions/to.$id.admin.server.ts index 1aaf81f88..abbcd1c38 100644 --- a/app/features/tournament/actions/to.$id.admin.server.ts +++ b/app/features/tournament/actions/to.$id.admin.server.ts @@ -160,7 +160,8 @@ export const action: ActionFunction = async ({ request, params }) => { const team = tournament.teamById(data.teamId); validate(team, "Invalid team id"); validate( - team.checkIns.length === 0 || team.members.length > 4, + team.checkIns.length === 0 || + team.members.length > tournament.minMembersPerTeam, "Can't remove last member from checked in team", ); validate(