diff --git a/apps/browser/src/background/runtime.background.ts b/apps/browser/src/background/runtime.background.ts index 33a18fbad2..b667936581 100644 --- a/apps/browser/src/background/runtime.background.ts +++ b/apps/browser/src/background/runtime.background.ts @@ -33,7 +33,6 @@ export default class RuntimeBackground { private pageDetailsToAutoFill: any[] = []; private onInstalledReason: string = null; private lockedVaultPendingNotifications: LockedVaultPendingNotificationsData[] = []; - private extensionRefreshIsActive: boolean = false; constructor( private main: MainBackground, @@ -90,10 +89,6 @@ export default class RuntimeBackground { return false; }; - this.extensionRefreshIsActive = await this.configService.getFeatureFlag( - FeatureFlag.ExtensionRefresh, - ); - this.messageListener.allMessages$ .pipe( mergeMap(async (message: any) => { @@ -234,7 +229,7 @@ export default class RuntimeBackground { await this.main.refreshBadge(); await this.main.refreshMenu(false); - if (this.extensionRefreshIsActive) { + if (await this.configService.getFeatureFlag(FeatureFlag.ExtensionRefresh)) { await this.autofillService.setAutoFillOnPageLoadOrgPolicy(); } break; @@ -257,7 +252,7 @@ export default class RuntimeBackground { await this.configService.ensureConfigFetched(); await this.main.updateOverlayCiphers(); - if (this.extensionRefreshIsActive) { + if (await this.configService.getFeatureFlag(FeatureFlag.ExtensionRefresh)) { await this.autofillService.setAutoFillOnPageLoadOrgPolicy(); } }