diff --git a/packages/web-sdk/src/utils/webStorage.ts b/packages/web-sdk/src/utils/webStorage.ts index 948549b1..6bb24fd8 100644 --- a/packages/web-sdk/src/utils/webStorage.ts +++ b/packages/web-sdk/src/utils/webStorage.ts @@ -25,7 +25,8 @@ export function isWebStorageAvailable(type: StorageMechanism): boolean { return true; } catch (error) { // the above can throw - faro.internalLogger?.info(`Web storage of type ${type} is not available. Reason: ${error}`); + // this is called during module init, when the global instance may not be available + faro?.internalLogger?.info(`Web storage of type ${type} is not available. Reason: ${error}`); return false; } }