From 86f8cc9f81082b33d5a38262d16123687b868ae6 Mon Sep 17 00:00:00 2001 From: evanpelle Date: Thu, 21 Aug 2025 11:55:52 -0700 Subject: [PATCH] fix team color (#1888) ## Description: Fix color assignment crashing squad games. For squad games, teams are assigned 1,2,3, etc. So the ColorAllocator cannot find them and throws an exception. ## Please complete the following: - [x] I have added screenshots for all UI updates - [x] I process any text displayed to the user through translateText() and I've added it to the en.json file - [x] I have added relevant tests to the test directory - [x] I confirm I have thoroughly tested these changes and take full responsibility for any bugs introduced ## Please put your Discord username so you can be contacted if a bug or regression is found: evan --- src/core/configuration/ColorAllocator.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/configuration/ColorAllocator.ts b/src/core/configuration/ColorAllocator.ts index 97d24eadf..e4bef8d36 100644 --- a/src/core/configuration/ColorAllocator.ts +++ b/src/core/configuration/ColorAllocator.ts @@ -48,7 +48,7 @@ export class ColorAllocator { case ColoredTeams.Bot: return botTeamColors; default: - throw new Error(`Unknown team color: ${team}`); + return [this.assignColor(team)]; } }