Skip to content

Commit 2df1047

Browse files
author
Evan You
committed
check for handler presence in v-on reset (#366)
1 parent 738a80e commit 2df1047

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/directives/on.js

+3-1
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,9 @@ module.exports = {
4646
var el = this.iframeBind
4747
? this.el.contentWindow
4848
: this.el
49-
el.removeEventListener(this.arg, this.handler)
49+
if (this.handler) {
50+
el.removeEventListener(this.arg, this.handler)
51+
}
5052
},
5153

5254
unbind: function () {

0 commit comments

Comments
 (0)