Skip to content

Commit 8a7f500

Browse files
zorn-vDanSnow
authored andcommitted
Emit error event on error-callback (#283)
1 parent 7ad2913 commit 8a7f500

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/Recaptcha.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,8 @@ export default {
5454
const opts = {
5555
...this.$props,
5656
callback: this.emitVerify,
57-
'expired-callback': this.emitExpired
57+
'expired-callback': this.emitExpired,
58+
'error-callback': this.emitError
5859
}
5960
const container = this.$slots.default ? this.$el.children[0] : this.$el
6061
recaptcha.render(container, opts, id => {
@@ -74,6 +75,9 @@ export default {
7475
},
7576
emitExpired () {
7677
this.$emit('expired')
78+
},
79+
emitError () {
80+
this.$emit('error')
7781
}
7882
},
7983
render (h) {

0 commit comments

Comments
 (0)