Handling nulls in getMyChannelMember (#2493)
* Handling nulls in getMyChannelMember * Addressing review comments
This commit is contained in:
parent
982cd7b7b1
commit
b810575ccd
1 changed files with 2 additions and 1 deletions
|
|
@ -15,12 +15,13 @@ import ChannelPeek from './channel_peek';
|
|||
|
||||
function mapStateToProps(state, ownProps) {
|
||||
const channelId = ownProps.channelId;
|
||||
const myMember = getMyChannelMember(state, channelId);
|
||||
|
||||
return {
|
||||
channelId,
|
||||
currentUserId: getCurrentUserId(state),
|
||||
postIds: getPostIdsInChannel(state, channelId),
|
||||
lastViewedAt: getMyChannelMember(state, channelId).last_viewed_at,
|
||||
lastViewedAt: myMember && myMember.last_viewed_at,
|
||||
theme: getTheme(state),
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue