mirror of
https://github.com/openfrontio/OpenFrontIO.git
synced 2026-06-25 18:24:36 +00:00
bugfix: ColorAllocator not copying fallbackColors causing it to be empty, causing npes
This commit is contained in:
@@ -349,7 +349,7 @@ export class ColorAllocator {
|
||||
return this.assigned.get(id)!;
|
||||
}
|
||||
if (this.availableColors.length === 0) {
|
||||
this.availableColors = this.fallbackColors;
|
||||
this.availableColors = [...this.fallbackColors];
|
||||
}
|
||||
const index = 0;
|
||||
const color = this.availableColors.splice(index, 1)[0];
|
||||
|
||||
Reference in New Issue
Block a user