Skip to content

Commit da73a7a

Browse files
authored
fix(utils): Fix XHR instrumentation early return (#9770)
This was introduced in #9542 😬 Ideally we could have a lint rule for this, but probably this is rather hard to do - so reminder to self to keep an eye out for this in the future! Closes #9747
1 parent 4ce3845 commit da73a7a

File tree

1 file changed

+2
-2
lines changed
  • packages/utils/src/instrument

1 file changed

+2
-2
lines changed

packages/utils/src/instrument/xhr.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ export function instrumentXHR(): void {
4646
const url = parseUrl(args[1]);
4747

4848
if (!method || !url) {
49-
return;
49+
return originalOpen.apply(this, args);
5050
}
5151

5252
this[SENTRY_XHR_DATA_KEY] = {
@@ -124,7 +124,7 @@ export function instrumentXHR(): void {
124124
const sentryXhrData = this[SENTRY_XHR_DATA_KEY];
125125

126126
if (!sentryXhrData) {
127-
return;
127+
return originalSend.apply(this, args);
128128
}
129129

130130
if (args[0] !== undefined) {

0 commit comments

Comments
 (0)