fix: check if channels exist before checking length

This commit is contained in:
Sean Yesmunt 2019-09-23 23:20:24 -04:00
parent 19289bd9a7
commit 6410790bb1

View file

@ -48,6 +48,7 @@ class ChannelSection extends React.PureComponent<Props, State> {
componentDidMount() { componentDidMount() {
const { channels = [], fetchChannelListMine, fetchingChannels } = this.props; const { channels = [], fetchChannelListMine, fetchingChannels } = this.props;
console.log('p', this.props);
if (!channels.length && !fetchingChannels) { if (!channels.length && !fetchingChannels) {
fetchChannelListMine(); fetchChannelListMine();
} }