mirror of
https://github.com/openfrontio/OpenFrontIO.git
synced 2026-06-30 16:42:14 +00:00
fix pattern and role bugs (#1343)
## Description: 1. this.cosmetics.role_groups[groupName] was undefined causing an error 2. When logging out, reset the pattern. This was causing an unauthorized pattern error because it persisted after log out. ## 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 - [x] I understand that submitting code with bugs that could have been caught through manual testing blocks releases and new features for all contributors ## Please put your Discord username so you can be contacted if a bug or regression is found: evan
This commit is contained in:
@@ -40,7 +40,7 @@ export class PrivilegeChecker {
|
||||
if (
|
||||
roles !== undefined &&
|
||||
roles.some((role) =>
|
||||
this.cosmetics.role_groups[groupName].includes(role),
|
||||
this.cosmetics.role_groups[groupName]?.includes(role),
|
||||
)
|
||||
) {
|
||||
// Player is in a role group for this pattern
|
||||
|
||||
Reference in New Issue
Block a user