diff options
-rw-r--r-- | webapp/stores/post_store.jsx | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/webapp/stores/post_store.jsx b/webapp/stores/post_store.jsx index b77c7bd3c..1c9a877cf 100644 --- a/webapp/stores/post_store.jsx +++ b/webapp/stores/post_store.jsx @@ -92,7 +92,12 @@ class PostStoreClass extends EventEmitter { } getPost(channelId, postId) { - const posts = this.postsInfo[channelId].postList; + const postInfo = this.postsInfo[channelId]; + if (postInfo == null) { + return null; + } + + const posts = postInfo.postList; let post = null; if (posts.posts.hasOwnProperty(postId)) { |