diff options
author | Joram Wilander <jwawilander@gmail.com> | 2017-03-03 12:25:32 -0500 |
---|---|---|
committer | Christopher Speller <crspeller@gmail.com> | 2017-03-03 12:25:32 -0500 |
commit | e739a91c94049aa62cfe76b9c6686fb18184232b (patch) | |
tree | 37d7f65f9f3fd59daea9d80473fd595eacd8c0f9 /webapp/stores/post_store.jsx | |
parent | 2e911b77c3386833f8f0cea82c7b6b3e5583a08e (diff) | |
download | chat-e739a91c94049aa62cfe76b9c6686fb18184232b.tar.gz chat-e739a91c94049aa62cfe76b9c6686fb18184232b.tar.bz2 chat-e739a91c94049aa62cfe76b9c6686fb18184232b.zip |
Fix JS error when receiving reply during channel switch (#5582)
Diffstat (limited to 'webapp/stores/post_store.jsx')
-rw-r--r-- | webapp/stores/post_store.jsx | 6 |
1 files changed, 3 insertions, 3 deletions
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; |