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,12 +32,14 @@ export default class ChannelNotificationsModal extends React.Component {
activeSection: '' activeSection: ''
}; };
} }
componentDidMount() { componentWillReceiveProps(nextProps) {
if (nextProps.show) {
this.onListenerChange();
ChannelStore.addChangeListener(this.onListenerChange); ChannelStore.addChangeListener(this.onListenerChange);
} } else {
componentWillUnmount() {
ChannelStore.removeChangeListener(this.onListenerChange); ChannelStore.removeChangeListener(this.onListenerChange);
} }
}
onListenerChange() { onListenerChange() {
const curChannelId = ChannelStore.getCurrentId(); const curChannelId = ChannelStore.getCurrentId();