From 53f4a102c7f008435af95505fd61e0631da2f60e Mon Sep 17 00:00:00 2001 From: evanpelle Date: Tue, 19 Aug 2025 14:35:30 -0700 Subject: [PATCH] unset pattern on logout (#1873) ## Description: During logout, the pattern was still set, so you would fail to join any game. This PR clears & unsets the chosen pattern on logout. ## 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 --- src/client/TerritoryPatternsModal.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/client/TerritoryPatternsModal.ts b/src/client/TerritoryPatternsModal.ts index dea5d61e4..e264c931c 100644 --- a/src/client/TerritoryPatternsModal.ts +++ b/src/client/TerritoryPatternsModal.ts @@ -46,6 +46,10 @@ export class TerritoryPatternsModal extends LitElement { } async onUserMe(userMeResponse: UserMeResponse | null) { + if (userMeResponse === null) { + this.userSettings.setSelectedPatternName(undefined); + this.selectedPattern = undefined; + } this.patterns = await patterns(userMeResponse); const storedPatternName = this.userSettings.getSelectedPatternName(); if (storedPatternName) {