mirror of
https://github.com/scratchfoundation/scratch-www.git
synced 2025-03-25 20:29:45 -04:00
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:
parent
b200f94d6b
commit
ce3fd38a10
1 changed files with 3 additions and 0 deletions
|
@ -9,6 +9,9 @@ var Session = {
|
|||
},
|
||||
componentWillMount: function () {
|
||||
window.addEventListener('session', this.updateSession);
|
||||
},
|
||||
componentWillUnmount: function () {
|
||||
window.removeEventListener('session', this.updateSession);
|
||||
}
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue