mirror of
https://github.com/element-hq/element-web.git
synced 2024-11-30 15:19:39 +03:00
Remember to unregister on unmoun
This commit is contained in:
parent
4548d1b824
commit
20fa36325f
1 changed files with 5 additions and 1 deletions
|
@ -29,7 +29,11 @@ export default class CreateOrReuseChatDialog extends React.Component {
|
|||
constructor(props) {
|
||||
super(props);
|
||||
this._onNewDMClick = this._onNewDMClick.bind(this);
|
||||
dis.register(this._onAction.bind(this));
|
||||
this.dispatcherRef = dis.register(this._onAction.bind(this));
|
||||
}
|
||||
|
||||
componentWillUnmount() {
|
||||
dis.unregister(this.dispatcherRef);
|
||||
}
|
||||
|
||||
_onAction(payload) {
|
||||
|
|
Loading…
Reference in a new issue