@hcaptcha/react-hcaptcha 1.6.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/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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hcaptcha/react-hcaptcha",
3
- "version": "1.6.0",
3
+ "version": "1.6.1",
4
4
  "types": "types/index.d.ts",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/esm/index.js",
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 () {