Skip to content

Commit 5ae1d09

Browse files
committed
guard against it
1 parent 12aa8ea commit 5ae1d09

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/browser/src/tracing/browserTracingIntegration.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -328,7 +328,7 @@ export const browserTracingIntegration = ((_options: Partial<BrowserTracingOptio
328328

329329
let lastClickTimestamp: number | undefined;
330330

331-
if (detectRedirects) {
331+
if (detectRedirects && optionalWindowDocument) {
332332
addEventListener('click', () => (lastClickTimestamp = timestampInSeconds()), { capture: true, passive: true });
333333
}
334334

0 commit comments

Comments
 (0)