updated componentwillreceiveprops to check for change in props

This commit is contained in:
bill bittner 2018-01-18 15:58:47 -08:00
parent ae86d3dfa2
commit c0b856d1f8

View file

@ -21,7 +21,7 @@ class ChannelSelect extends React.Component {
}
}
componentWillReceiveProps ({ loggedInChannelName }) {
if (loggedInChannelName) {
if (loggedInChannelName && (loggedInChannelName !== this.props.loggedInChannelName)) {
this.selectOption(loggedInChannelName);
}
}