Skip to content

Commit

Permalink
fix(utils): Fix XHR instrumentation early return
Browse files Browse the repository at this point in the history
  • Loading branch information
mydea committed Dec 7, 2023
1 parent 4ce3845 commit 0b65c57
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/utils/src/instrument/xhr.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ export function instrumentXHR(): void {
const url = parseUrl(args[1]);

if (!method || !url) {
return;
return originalOpen.apply(this, args);
}

this[SENTRY_XHR_DATA_KEY] = {
Expand Down Expand Up @@ -124,7 +124,7 @@ export function instrumentXHR(): void {
const sentryXhrData = this[SENTRY_XHR_DATA_KEY];

if (!sentryXhrData) {
return;
return originalSend.apply(this, args);
}

if (args[0] !== undefined) {
Expand Down

0 comments on commit 0b65c57

Please sign in to comment.