Fix accidental adding of change listener on unmount

Этот коммит содержится в:
JoramWilander
2016-02-08 12:41:51 -05:00
родитель b6300b1656
Коммит 2cd72122ef

Просмотреть файл

@@ -57,7 +57,7 @@ class MoreDirectChannels extends React.Component {
} }
componentWillUnmount() { componentWillUnmount() {
UserStore.addChangeListener(this.handleUserChange); UserStore.removeChangeListener(this.handleUserChange);
} }
componentDidUpdate(prevProps) { componentDidUpdate(prevProps) {
@@ -318,4 +318,4 @@ MoreDirectChannels.propTypes = {
onModalDismissed: React.PropTypes.func onModalDismissed: React.PropTypes.func
}; };
export default injectIntl(MoreDirectChannels); export default injectIntl(MoreDirectChannels);