1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-15 07:43:35 +00:00

[PM-2676] Fix web set environment urls after state init (#5632)

* [PM-2676] Fix web set env urls after state init.

* [PM-2676] Add note to remove workaround
This commit is contained in:
André Bispo
2023-06-20 20:44:46 +01:00
committed by GitHub
parent ff18a5b905
commit 4124f7bdc8
4 changed files with 17 additions and 8 deletions

View File

@@ -38,11 +38,15 @@ export class InitService {
init() {
return async () => {
// Workaround to ignore stateService.activeAccount until process.env.URLS are set
// TODO: Remove this when implementing ticket PM-2637
this.environmentService.initialized = false;
await this.stateService.init();
const urls = process.env.URLS as Urls;
urls.base ??= this.win.location.origin;
this.environmentService.setUrls(urls);
this.environmentService.initialized = true;
setTimeout(() => this.notificationsService.init(), 3000);
(this.vaultTimeoutService as VaultTimeoutService).init(true);