From 2cd72122efdbe89efe681993300e76cb43176310 Mon Sep 17 00:00:00 2001 From: JoramWilander Date: Mon, 8 Feb 2016 12:41:51 -0500 Subject: Fix accidental adding of change listener on unmount --- web/react/components/more_direct_channels.jsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'web/react') 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); -- cgit v1.2.3-1-g7c22