Skip to content

Commit 3fcd6d8

Browse files
authored
fix(browser): Check for document when sending outcomes (#3993)
1 parent 4841625 commit 3fcd6d8

File tree

1 file changed

+1
-1
lines changed
  • packages/browser/src/transports

1 file changed

+1
-1
lines changed

packages/browser/src/transports/base.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ export abstract class BaseTransport implements Transport {
4242
// eslint-disable-next-line deprecation/deprecation
4343
this.url = this._api.getStoreEndpointWithUrlEncodedAuth();
4444

45-
if (this.options.sendClientReports) {
45+
if (this.options.sendClientReports && document) {
4646
document.addEventListener('visibilitychange', () => {
4747
if (document.visibilityState === 'hidden') {
4848
this._flushOutcomes();

0 commit comments

Comments
 (0)