Skip to content

Commit

Permalink
fix: disable listeners on unbind
Browse files Browse the repository at this point in the history
  • Loading branch information
SahajR committed Jan 16, 2018
1 parent d52f8f3 commit b624e7b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/farewell.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@ export default {
let timer = null
let disableKeydown = false

el.$destroy = () => { disable() }

// Cookie helpers
const parseCookies = () => {
const cookies = document.cookie.split('; ')
Expand Down Expand Up @@ -76,6 +74,8 @@ export default {
}

attachExitListener()

el.$destroy = () => { disable() }
},
unbind (el) {
el.$destroy()
Expand Down

0 comments on commit b624e7b

Please sign in to comment.