diff --git a/common/src/services/state.service.ts b/common/src/services/state.service.ts index 49d5ab1164e..446b9fde781 100644 --- a/common/src/services/state.service.ts +++ b/common/src/services/state.service.ts @@ -2219,6 +2219,7 @@ export class StateService await this.storageService.remove(keys.tempAccountSettings); } account.settings.environmentUrls = environmentUrls; + Object.assign(account.settings, this.createAccount().settings); await this.storageService.save( account.profile.userId, account, diff --git a/common/src/services/stateMigration.service.ts b/common/src/services/stateMigration.service.ts index ddc191aeda3..ec2a0986d4e 100644 --- a/common/src/services/stateMigration.service.ts +++ b/common/src/services/stateMigration.service.ts @@ -193,6 +193,12 @@ export class StateMigrationService { alwaysShowDock: await this.get(v1Keys.alwaysShowDock), }; + // Some processes, like biometrics, may have already defined a value before migrations are run + const existingGlobals = await this.get(keys.global); + if (existingGlobals != null) { + Object.assign(globals, existingGlobals); + } + const userId = (await this.get(v1Keys.userId)) ?? (await this.get(v1Keys.entityId));