mirror of
https://github.com/openfrontio/OpenFrontIO.git
synced 2026-07-01 23:13:29 +00:00
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
This commit is contained in:
committed by
Scott Anderson
parent
8965ad53b0
commit
86f8cc9f81
@@ -48,7 +48,7 @@ export class ColorAllocator {
|
||||
case ColoredTeams.Bot:
|
||||
return botTeamColors;
|
||||
default:
|
||||
throw new Error(`Unknown team color: ${team}`);
|
||||
return [this.assignColor(team)];
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user