Fix JS error when receiving reply during channel switch (#5582)

This commit is contained in:
Joram Wilander
2017-03-03 12:25:32 -05:00
committed by Christopher Speller
parent 2e911b77c3
commit e739a91c94
4 changed files with 22 additions and 4 deletions

View File

@@ -99,11 +99,11 @@ class PostStoreClass extends EventEmitter {
return null;
}
const posts = postInfo.postList;
const postList = postInfo.postList;
let post = null;
if (posts.posts.hasOwnProperty(postId)) {
post = posts.posts[postId];
if (postList && postList.posts && postList.posts.hasOwnProperty(postId)) {
post = postList.posts[postId];
}
return post;