Merge pull request #1560 from mattermost/plt-1270

PLT-1270 Fix channel creation errors
Этот коммит содержится в:
Christopher Speller
2015-12-01 14:47:19 -05:00
родитель d0b73c0267 362b9f2f94
Коммит e99437aa3b

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

@@ -32,11 +32,13 @@ export default class ChannelNotificationsModal extends React.Component {
activeSection: '' activeSection: ''
}; };
} }
componentDidMount() { componentWillReceiveProps(nextProps) {
ChannelStore.addChangeListener(this.onListenerChange); if (nextProps.show) {
} this.onListenerChange();
componentWillUnmount() { ChannelStore.addChangeListener(this.onListenerChange);
ChannelStore.removeChangeListener(this.onListenerChange); } else {
ChannelStore.removeChangeListener(this.onListenerChange);
}
} }
onListenerChange() { onListenerChange() {
const curChannelId = ChannelStore.getCurrentId(); const curChannelId = ChannelStore.getCurrentId();