mirror of
https://github.com/element-hq/element-web
synced 2024-11-28 04:21:57 +03:00
remove listener on unmount
This commit is contained in:
parent
3c2c2b051b
commit
574560cc05
1 changed files with 1 additions and 0 deletions
|
@ -274,6 +274,7 @@ module.exports = React.createClass({
|
|||
}
|
||||
dis.unregister(this.dispatcherRef);
|
||||
if (MatrixClientPeg.get()) {
|
||||
MatrixClientPeg.get().removeListener("Room", this.onRoom);
|
||||
MatrixClientPeg.get().removeListener("Room.timeline", this.onRoomTimeline);
|
||||
MatrixClientPeg.get().removeListener("Room.name", this.onRoomName);
|
||||
MatrixClientPeg.get().removeListener("Room.accountData", this.onRoomAccountData);
|
||||
|
|
Loading…
Reference in a new issue