diff options
author | JoramWilander <jwawilander@gmail.com> | 2016-02-08 12:41:51 -0500 |
---|---|---|
committer | JoramWilander <jwawilander@gmail.com> | 2016-02-08 12:41:51 -0500 |
commit | 2cd72122efdbe89efe681993300e76cb43176310 (patch) | |
tree | 203ddcc4bac29d3ac7f87788503705112e0e43f8 /web/react | |
parent | b6300b1656506b3ce264c8844dd11865ca61d391 (diff) | |
download | chat-2cd72122efdbe89efe681993300e76cb43176310.tar.gz chat-2cd72122efdbe89efe681993300e76cb43176310.tar.bz2 chat-2cd72122efdbe89efe681993300e76cb43176310.zip |
Fix accidental adding of change listener on unmount
Diffstat (limited to 'web/react')
-rw-r--r-- | web/react/components/more_direct_channels.jsx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/web/react/components/more_direct_channels.jsx b/web/react/components/more_direct_channels.jsx index f8a6884d0..3b72b251c 100644 --- a/web/react/components/more_direct_channels.jsx +++ b/web/react/components/more_direct_channels.jsx @@ -57,7 +57,7 @@ class MoreDirectChannels extends React.Component { } componentWillUnmount() { - UserStore.addChangeListener(this.handleUserChange); + UserStore.removeChangeListener(this.handleUserChange); } componentDidUpdate(prevProps) { @@ -318,4 +318,4 @@ MoreDirectChannels.propTypes = { onModalDismissed: React.PropTypes.func }; -export default injectIntl(MoreDirectChannels);
\ No newline at end of file +export default injectIntl(MoreDirectChannels); |