Check if post.data has values bofore joining a channel (#2050)
This commit is contained in:
parent
a14a220d14
commit
ebe7317c5f
1 changed files with 1 additions and 1 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Reference in a new issue