Skip to content

Commit 3caeadb

Browse files
committed
fix test
1 parent bcbf941 commit 3caeadb

File tree

2 files changed

+1
-21
lines changed

2 files changed

+1
-21
lines changed

packages/browser/test/integration/suites/onunhandledrejection.js

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -243,24 +243,4 @@ describe('window.onunhandledrejection', function () {
243243
}
244244
});
245245
});
246-
247-
it('should skip our own failed requests that somehow bubbled-up to unhandledrejection handler', function () {
248-
return runInSandbox(sandbox, function () {
249-
if (supportsOnunhandledRejection()) {
250-
Promise.reject({
251-
__sentry_own_request__: true,
252-
});
253-
Promise.reject({
254-
__sentry_own_request__: false,
255-
});
256-
Promise.reject({});
257-
} else {
258-
window.resolveTest({ window: window });
259-
}
260-
}).then(function (summary) {
261-
if (summary.window.supportsOnunhandledRejection()) {
262-
assert.equal(summary.events.length, 2);
263-
}
264-
});
265-
});
266246
});

packages/tracing-internal/src/browser/request.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -242,7 +242,7 @@ export function xhrCallback(
242242
const xhr = handlerData.xhr;
243243
const sentryXhrData = xhr && xhr[SENTRY_XHR_DATA_KEY];
244244

245-
if (!hasTracingEnabled() || (xhr && xhr.__sentry_own_request__) || !xhr || !sentryXhrData) {
245+
if (!hasTracingEnabled() || !xhr || xhr.__sentry_own_request__ || !sentryXhrData) {
246246
return undefined;
247247
}
248248

0 commit comments

Comments
 (0)