updated componentwillreceiveprops to check for change in props
This commit is contained in:
parent
ae86d3dfa2
commit
c0b856d1f8
1 changed files with 1 additions and 1 deletions
|
@ -21,7 +21,7 @@ class ChannelSelect extends React.Component {
|
|||
}
|
||||
}
|
||||
componentWillReceiveProps ({ loggedInChannelName }) {
|
||||
if (loggedInChannelName) {
|
||||
if (loggedInChannelName && (loggedInChannelName !== this.props.loggedInChannelName)) {
|
||||
this.selectOption(loggedInChannelName);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue