Skip to content

Commit

Permalink
fix: detach clickout listener in beforeDestroy
Browse files Browse the repository at this point in the history
  • Loading branch information
tmorehouse committed Nov 28, 2017
1 parent 68ddba4 commit 89618de
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/mixins/clickout.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ export default {
document.documentElement.addEventListener('click', this._clickOutListener)
}
},
destroyed () {
beforeDestroy () {
if (typeof document !== 'undefined') {
document.removeEventListener('click', this._clickOutListener)
}
Expand Down

0 comments on commit 89618de

Please sign in to comment.