diff --git a/webapp/stores/post_store.jsx b/webapp/stores/post_store.jsx index b77c7bd3cd..1c9a877cf5 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)) {