Check if post.data has values bofore joining a channel (#2050)

This commit is contained in:
Elias Nahum 2018-08-29 16:19:01 -03:00 committed by Saturnino Abril
parent a14a220d14
commit ebe7317c5f

View file

@ -265,7 +265,7 @@ export default class Permalink extends PureComponent {
}
if (!channelId) {
const focusedPost = post.data.posts[focusedPostId];
const focusedPost = post.data && post.data.posts ? post.data.posts[focusedPostId] : null;
focusChannelId = focusedPost ? focusedPost.channel_id : '';
if (focusChannelId && !this.props.myMembers[focusChannelId]) {
const {data: channel} = await actions.getChannel(focusChannelId);