Skip to content

Commit e9e3dbf

Browse files
committed
Merge pull request #370 from simplesmiler/patch-2
Fix unbinding click handler
2 parents c5281ca + 46aea24 commit e9e3dbf

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/directives/link.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,8 @@ export default function (Vue) {
5252
return
5353
}
5454
// handle click
55-
this.el.addEventListener('click', bind(this.onClick, this))
55+
this.handler = bind(this.onClick, this)
56+
this.el.addEventListener('click', this.handler)
5657
},
5758

5859
update (target) {

0 commit comments

Comments
 (0)