Skip to content

Commit

Permalink
Emit error event on error-callback (#283)
Browse files Browse the repository at this point in the history
  • Loading branch information
zorn-v authored and DanSnow committed Sep 25, 2019
1 parent 7ad2913 commit 8a7f500
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/Recaptcha.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,8 @@ export default {
const opts = {
...this.$props,
callback: this.emitVerify,
'expired-callback': this.emitExpired
'expired-callback': this.emitExpired,
'error-callback': this.emitError
}
const container = this.$slots.default ? this.$el.children[0] : this.$el
recaptcha.render(container, opts, id => {
Expand All @@ -74,6 +75,9 @@ export default {
},
emitExpired () {
this.$emit('expired')
},
emitError () {
this.$emit('error')
}
},
render (h) {
Expand Down

0 comments on commit 8a7f500

Please sign in to comment.