diff --git a/common/src/services/state.service.ts b/common/src/services/state.service.ts index 6e4da55dc8..49d5ab1164 100644 --- a/common/src/services/state.service.ts +++ b/common/src/services/state.service.ts @@ -2210,14 +2210,15 @@ export class StateService account.profile.userId, await this.defaultOnDiskLocalOptions() ); + // EnvironmentUrls are set before authenticating and should override whatever is stored from any previous session + const environmentUrls = account.settings.environmentUrls; if (storedAccount?.settings != null) { - // EnvironmentUrls are set before authenticating and should override whatever is stored from last session - storedAccount.settings.environmentUrls = account.settings.environmentUrls; account.settings = storedAccount.settings; } else if (await this.storageService.has(keys.tempAccountSettings)) { account.settings = await this.storageService.get(keys.tempAccountSettings); await this.storageService.remove(keys.tempAccountSettings); } + account.settings.environmentUrls = environmentUrls; await this.storageService.save( account.profile.userId, account,