[FIX] Remove listeners on RoomView header unmount (#874)
This commit is contained in:
parent
6edef99d37
commit
7e513ee73a
|
@ -98,6 +98,13 @@ export default class RoomHeaderView extends Component {
|
|||
return false;
|
||||
}
|
||||
|
||||
componentWillUnmount() {
|
||||
this.usersTyping.removeAllListeners();
|
||||
if (this.user && this.user.removeAllListeners) {
|
||||
this.user.removeAllListeners();
|
||||
}
|
||||
}
|
||||
|
||||
updateState = () => {
|
||||
this.setState({ usersTyping: this.usersTyping.slice() });
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue