diff --git a/packages/core/src/transport/eventBridge.ts b/packages/core/src/transport/eventBridge.ts index 97533a6d7c..6c03bad48e 100644 --- a/packages/core/src/transport/eventBridge.ts +++ b/packages/core/src/transport/eventBridge.ts @@ -26,7 +26,7 @@ export function getEventBridge() { } } -export function canUseEventBridge(hostname = window.location.hostname): boolean { +export function canUseEventBridge(hostname = getGlobalObject().location?.hostname): boolean { const bridge = getEventBridge() return ( !!bridge &&