mirror of
https://github.com/scratchfoundation/scratch-www.git
synced 2025-03-14 15:09:59 -04:00
Merge pull request #140 from rschamp/feature/remove-session-listener-on-unmount
Remove the session listener on unmount
This commit is contained in:
commit
9374d917dc
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…
Reference in a new issue