diff --git a/apps/browser/src/services/browser-environment.service.ts b/apps/browser/src/services/browser-environment.service.ts index 384d22fda519..b3aab9a7a10a 100644 --- a/apps/browser/src/services/browser-environment.service.ts +++ b/apps/browser/src/services/browser-environment.service.ts @@ -20,6 +20,10 @@ export class BrowserEnvironmentService extends EnvironmentService { } async settingsHaveChanged() { + if (!(await this.hasManagedEnvironment())) { + return false; + } + const env = await this.getManagedEnvironment(); return ( @@ -37,6 +41,10 @@ export class BrowserEnvironmentService extends EnvironmentService { return devFlagEnabled("managedEnvironment") ? new Promise((resolve) => resolve(devFlagValue("managedEnvironment"))) : new Promise((resolve, reject) => { + if (chrome.storage.managed == null) { + return resolve(null); + } + chrome.storage.managed.get("environment", (result) => { if (chrome.runtime.lastError) { return reject(chrome.runtime.lastError);