From 6cae626299481ed26581d6010bab85dcdc79cd6f Mon Sep 17 00:00:00 2001 From: Teddy Roncin Date: Tue, 17 Oct 2023 19:17:42 +0200 Subject: [PATCH] fix: fixed crash when caster array was empty --- src/controllers/admin/tournaments/updateTournament.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/controllers/admin/tournaments/updateTournament.ts b/src/controllers/admin/tournaments/updateTournament.ts index 44976370..7f2ce40b 100644 --- a/src/controllers/admin/tournaments/updateTournament.ts +++ b/src/controllers/admin/tournaments/updateTournament.ts @@ -50,8 +50,8 @@ export default [ for (const casterName of request.body.casters) { await addCasterToTournament(request.params.tournamentId as string, casterName); } - request.body.casters = undefined; } + request.body.casters = undefined; const result = await updateTournament(request.params.tournamentId as string, request.body);