Remove the session listener on unmount

This will prevent bugs if we ever use the mixin on a component that isn't a view
This commit is contained in:
Ray Schamp 2015-10-22 20:57:04 -04:00
parent b200f94d6b
commit ce3fd38a10

View file

@ -9,6 +9,9 @@ var Session = {
},
componentWillMount: function () {
window.addEventListener('session', this.updateSession);
},
componentWillUnmount: function () {
window.removeEventListener('session', this.updateSession);
}
};