Skip to content

Commit

Permalink
Fix postlist connector when channel is undefined (mattermost#2573)
Browse files Browse the repository at this point in the history
  • Loading branch information
enahum authored and sudheerDev committed Mar 30, 2019
1 parent b11b42c commit 03177f2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion components/post_view/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ function makeMapStateToProps() {
const channel = getChannel(state, ownProps.channelId);
const team = getTeamByName(state, ownProps.match.params.team);
let teammate;
if (channel.type === Constants.DM_CHANNEL && channel.teammate_id) {
if (channel && channel.type === Constants.DM_CHANNEL && channel.teammate_id) {
teammate = getUser(state, channel.teammate_id);
}

Expand Down

0 comments on commit 03177f2

Please sign in to comment.