Default to an empty channel object (#5094)

This commit is contained in:
Miguel Alatzar 2021-01-07 15:08:29 -07:00 committed by GitHub
parent 7702c050bf
commit ac85110ce7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -24,7 +24,7 @@ function makeMapStateToProps() {
const getChannel = makeGetChannel();
return (state, ownProps) => {
const channel = ownProps.channel || getChannel(state, {id: ownProps.channelId});
const channel = ownProps.channel || getChannel(state, {id: ownProps.channelId}) || {};
const member = getMyChannelMember(state, channel.id);
const currentUserId = getCurrentUserId(state);
const channelDraft = getDraftForChannel(state, channel.id);