Skip to content

Commit

Permalink
fix(sentry): add polyfills and use xhr for es5 (#25)
Browse files Browse the repository at this point in the history
  • Loading branch information
faris-imi authored Feb 22, 2024
1 parent 16ed004 commit 5787670
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
4 changes: 4 additions & 0 deletions lib/src/polyfills.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
import 'core-js/es/array/find';
import 'core-js/es/array/includes';
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
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@hcaptcha/loader",
"description": "This is a JavaScript library to easily configure the loading of the hCaptcha JS client SDK with built-in error handling.",
"version": "1.2.2",
"version": "1.2.3",
"author": "hCaptcha team and contributors",
"license": "MIT",
"keywords": [
Expand Down

0 comments on commit 5787670

Please sign in to comment.