diff --git a/packages/experiment-browser/src/integration/manager.ts b/packages/experiment-browser/src/integration/manager.ts index 30ea7898..429532f6 100644 --- a/packages/experiment-browser/src/integration/manager.ts +++ b/packages/experiment-browser/src/integration/manager.ts @@ -125,13 +125,13 @@ export class IntegrationManager { export class SessionDedupeCache { private readonly storageKey: string; - private readonly isSessionStorageAvailable = isSessionStorageAvailable(); + private readonly isSessionStorageAvailable = checkIsSessionStorageAvailable(); private inMemoryCache: Record = {}; constructor(instanceName: string) { this.storageKey = `EXP_sent_v2_${instanceName}`; // Remove previous version of storage if it exists. - if (isSessionStorageAvailable) { + if (this.isSessionStorageAvailable) { safeGlobal.sessionStorage.removeItem(`EXP_sent_${instanceName}`); } } @@ -239,7 +239,7 @@ export class PersistentTrackingQueue { } } -const isSessionStorageAvailable = (): boolean => { +const checkIsSessionStorageAvailable = (): boolean => { const globalScope = getGlobalScope(); if (globalScope) { try {