Skip to content

Commit

Permalink
fix(sentry): add polyfills and use xhr for es5
Browse files Browse the repository at this point in the history
  • Loading branch information
faris-imi committed Feb 22, 2024
1 parent 19238d8 commit f3c1d22
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions lib/src/polyfills.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,6 @@ import 'core-js/es/array/find';
import 'core-js/es/object/assign';
import 'core-js/es/object/entries';
import 'core-js/es/object/get-own-property-descriptors';
import 'core-js/es/map';
import 'core-js/es/set';
import 'core-js/es/symbol';
2 changes: 1 addition & 1 deletion lib/src/sentry.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export function initSentry(

const client = new Sentry.BrowserClient({
dsn: SENTRY_DSN,
transport: Sentry.makeFetchTransport,
transport: window.fetch ? Sentry.makeFetchTransport : Sentry.makeXHRTransport,
stackParser: Sentry.defaultStackParser,
integrations: [
new Sentry.Breadcrumbs(),
Expand Down

0 comments on commit f3c1d22

Please sign in to comment.