Skip to content
This repository has been archived by the owner on Mar 11, 2018. It is now read-only.

Commit

Permalink
Move removeEventListener
Browse files Browse the repository at this point in the history
  • Loading branch information
Yuan Qing committed Feb 11, 2016
1 parent ba0d612 commit a700ece
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/index.js
Expand Up @@ -25,9 +25,9 @@ export default (element = window) => {
}
listeners.splice(listenerIndex, 1);
if (listeners.length === 0) {
element.removeEventListener(eventName, mapEventNameToSharedListener[eventName]);
delete mapEventNameToListeners[eventName];
delete mapEventNameToSharedListener[eventName];
element.removeEventListener(eventName, mapEventNameToSharedListener[eventName]);
}
}

Expand Down

0 comments on commit a700ece

Please sign in to comment.