mirror of
https://github.com/openfrontio/OpenFrontIO.git
synced 2026-07-03 22:50:35 +00:00
custom color bugfixes: don't add hash because it is already present in flare, clear current color on logout
This commit is contained in:
@@ -100,7 +100,7 @@ export class PrivilegeCheckerImpl implements PrivilegeChecker {
|
||||
isColorAllowed(flares: string[], color: string): PlayerColor {
|
||||
const allowedColors = flares
|
||||
.filter((flare) => flare.startsWith("color:"))
|
||||
.map((flare) => "#" + flare.split(":")[1]);
|
||||
.map((flare) => flare.split(":")[1]);
|
||||
if (!allowedColors.includes(color)) {
|
||||
throw new Error(`Color ${color} not allowed`);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user