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 GitHub
parent 79a84dd9ab
commit 45784e5fcd
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

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),
};
}