diff --git a/src/components/views/dialogs/ChatCreateOrReuseDialog.js b/src/components/views/dialogs/ChatCreateOrReuseDialog.js index 676ed0ce0a..53c5113b5d 100644 --- a/src/components/views/dialogs/ChatCreateOrReuseDialog.js +++ b/src/components/views/dialogs/ChatCreateOrReuseDialog.js @@ -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) {