From e739a91c94049aa62cfe76b9c6686fb18184232b Mon Sep 17 00:00:00 2001 From: Joram Wilander Date: Fri, 3 Mar 2017 12:25:32 -0500 Subject: Fix JS error when receiving reply during channel switch (#5582) --- webapp/stores/post_store.jsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'webapp') diff --git a/webapp/stores/post_store.jsx b/webapp/stores/post_store.jsx index 360b7cd72..6e312f67a 100644 --- a/webapp/stores/post_store.jsx +++ b/webapp/stores/post_store.jsx @@ -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; -- cgit v1.2.3-1-g7c22