From c653156bb527f529345bc02101996b66fcd6ac46 Mon Sep 17 00:00:00 2001 From: Faris Mahmutovic Date: Mon, 6 Nov 2023 13:34:57 +0100 Subject: [PATCH] fix: update loader version --- package-lock.json | 14 +++++++------- package.json | 2 +- src/index.js | 14 +++++++------- 3 files changed, 15 insertions(+), 15 deletions(-) diff --git a/package-lock.json b/package-lock.json index edb09a4..f0d4543 100644 --- a/package-lock.json +++ b/package-lock.json @@ -10,7 +10,7 @@ "license": "MIT", "dependencies": { "@babel/runtime": "^7.17.9", - "@hcaptcha/loader": "^1.0.7" + "@hcaptcha/loader": "^1.0.8" }, "devDependencies": { "@babel/cli": "^7.12.1", @@ -1698,9 +1698,9 @@ } }, "node_modules/@hcaptcha/loader": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/@hcaptcha/loader/-/loader-1.0.7.tgz", - "integrity": "sha512-5MYFEFVFM88gJb5XT95/yw5AM/4vxdQaC46faIuDHHwyzHpeQ53dhujHQZlGFt6NDVHe+5QKbGUKZkvAG/3t7Q==" + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/@hcaptcha/loader/-/loader-1.0.8.tgz", + "integrity": "sha512-c22xMGeFZd3QBd7AVqISevjaXnXyyysQ1TCDvWgsdcsm4ImtxogU7Dc2txdqZ4f1ENNE272lL73XxgAH+V1GNQ==" }, "node_modules/@istanbuljs/load-nyc-config": { "version": "1.1.0", @@ -11842,9 +11842,9 @@ "dev": true }, "@hcaptcha/loader": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/@hcaptcha/loader/-/loader-1.0.7.tgz", - "integrity": "sha512-5MYFEFVFM88gJb5XT95/yw5AM/4vxdQaC46faIuDHHwyzHpeQ53dhujHQZlGFt6NDVHe+5QKbGUKZkvAG/3t7Q==" + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/@hcaptcha/loader/-/loader-1.0.8.tgz", + "integrity": "sha512-c22xMGeFZd3QBd7AVqISevjaXnXyyysQ1TCDvWgsdcsm4ImtxogU7Dc2txdqZ4f1ENNE272lL73XxgAH+V1GNQ==" }, "@istanbuljs/load-nyc-config": { "version": "1.1.0", diff --git a/package.json b/package.json index ad95ee4..1f84559 100644 --- a/package.json +++ b/package.json @@ -59,6 +59,6 @@ }, "dependencies": { "@babel/runtime": "^7.17.9", - "@hcaptcha/loader": "^1.0.7" + "@hcaptcha/loader": "^1.0.8" } } diff --git a/src/index.js b/src/index.js index cd1ddd2..f55a005 100644 --- a/src/index.js +++ b/src/index.js @@ -54,7 +54,7 @@ class HCaptcha extends React.Component { this.sentryHub = initSentry(this.props.sentry, scopeTag); - this.sentryHub?.addBreadcrumb({ + this.sentryHub.addBreadcrumb({ category: scopeTag.value, message: breadcrumbMessages.mounted, }); @@ -92,7 +92,7 @@ class HCaptcha extends React.Component { hcaptcha.reset(captchaId); hcaptcha.remove(captchaId); - this.sentryHub?.addBreadcrumb({ + this.sentryHub.addBreadcrumb({ category: scopeTag.value, message: breadcrumbMessages.unmounted, }); @@ -198,7 +198,7 @@ class HCaptcha extends React.Component { // Reset captcha state, removes stored token and unticks checkbox hcaptcha.reset(captchaId) - this.sentryHub?.addBreadcrumb({ + this.sentryHub.addBreadcrumb({ category: scopeTag.value, message: breadcrumbMessages.reset, }); @@ -218,7 +218,7 @@ class HCaptcha extends React.Component { }); - this.sentryHub?.addBreadcrumb({ + this.sentryHub.addBreadcrumb({ category: scopeTag.value, message: breadcrumbMessages.removed, }); @@ -241,7 +241,7 @@ class HCaptcha extends React.Component { if (onLoad) onLoad(); }); } catch (error) { - this.sentryHub?.captureException(error); + this.sentryHub.captureException(error); } }); } @@ -271,7 +271,7 @@ class HCaptcha extends React.Component { if (onExpire) onExpire(); - this.sentryHub?.addBreadcrumb({ + this.sentryHub.addBreadcrumb({ category: scopeTag.value, message: breadcrumbMessages.expired, }); @@ -336,7 +336,7 @@ class HCaptcha extends React.Component { return hcaptcha.execute(captchaId, opts); } catch (error) { - this.sentryHub?.captureException(error); + this.sentryHub.captureException(error); } }