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:
evanpelle
2025-07-04 13:13:19 -07:00
committed by GitHub
parent 7a3a3a59e8
commit 0fed0e96f9
3 changed files with 10 additions and 5 deletions
+1 -1
View File
@@ -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