Ensure the correct value for channelIsLoading is used (#2712)

This commit is contained in:
Miguel Alatzar 2019-04-15 10:53:02 -07:00 committed by Miguel Alatzar
parent 7efb044aa9
commit 69a2c58f5e

View file

@ -11,8 +11,12 @@ import {handleSelectChannel, setChannelLoading} from 'app/actions/views/channel'
import ChannelLoader from './channel_loader';
function mapStateToProps(state, ownProps) {
const channelIsLoading = ownProps.hasOwnProperty('channelIsLoading') ?
ownProps.channelIsLoading :
state.views.channel.loading;
return {
channelIsLoading: ownProps.channelIsLoading || state.views.channel.loading,
channelIsLoading,
theme: getTheme(state),
};
}