@hcaptcha/react-hcaptcha 1.5.0 → 1.6.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -0
- package/dist/esm/index.js +1 -1
- package/dist/index.js +1 -1
- package/package.json +1 -2
- package/src/index.js +1 -1
package/README.md
CHANGED
|
@@ -139,6 +139,7 @@ return <HCaptcha ref={captchaRef} onLoad={onLoad} sitekey={sitekey} {...props} /
|
|
|
139
139
|
|`reportapi`|String|No|`-`|See enterprise docs.|
|
|
140
140
|
|`sentry`|String|No|`-`|See enterprise docs.|
|
|
141
141
|
|`custom`|Boolean|No|`-`|See enterprise docs.|
|
|
142
|
+
|`loadAsync`|Boolean|No|`true`|Set if the script should be loaded asynchronously|
|
|
142
143
|
|
|
143
144
|
#### Events
|
|
144
145
|
|
package/dist/esm/index.js
CHANGED
|
@@ -241,7 +241,7 @@ var HCaptcha = /*#__PURE__*/function (_React$Component) {
|
|
|
241
241
|
|
|
242
242
|
var ekey = hcaptcha.getRespKey(captchaId); //Get current challenge session id from hCaptcha widget
|
|
243
243
|
|
|
244
|
-
onVerify(token, ekey); //Dispatch event to verify user response
|
|
244
|
+
if (onVerify) onVerify(token, ekey); //Dispatch event to verify user response
|
|
245
245
|
};
|
|
246
246
|
|
|
247
247
|
_proto.handleExpire = function handleExpire() {
|
package/dist/index.js
CHANGED
|
@@ -280,7 +280,7 @@ var HCaptcha = /*#__PURE__*/function (_React$Component) {
|
|
|
280
280
|
|
|
281
281
|
var ekey = hcaptcha.getRespKey(captchaId); //Get current challenge session id from hCaptcha widget
|
|
282
282
|
|
|
283
|
-
onVerify(token, ekey); //Dispatch event to verify user response
|
|
283
|
+
if (onVerify) onVerify(token, ekey); //Dispatch event to verify user response
|
|
284
284
|
}
|
|
285
285
|
}, {
|
|
286
286
|
key: "handleExpire",
|
package/package.json
CHANGED
package/src/index.js
CHANGED
|
@@ -232,7 +232,7 @@ class HCaptcha extends React.Component {
|
|
|
232
232
|
|
|
233
233
|
const token = hcaptcha.getResponse(captchaId) //Get response token from hCaptcha widget
|
|
234
234
|
const ekey = hcaptcha.getRespKey(captchaId) //Get current challenge session id from hCaptcha widget
|
|
235
|
-
onVerify(token, ekey) //Dispatch event to verify user response
|
|
235
|
+
if (onVerify) onVerify(token, ekey) //Dispatch event to verify user response
|
|
236
236
|
}
|
|
237
237
|
|
|
238
238
|
handleExpire () {
|