diff --git a/web/react/stores/post_store.jsx b/web/react/stores/post_store.jsx index 5100a4936a..1dc0dc9bf6 100644 --- a/web/react/stores/post_store.jsx +++ b/web/react/stores/post_store.jsx @@ -265,6 +265,12 @@ class PostStoreClass extends EventEmitter { } deletePost(post) { + const postInfo = this.postsInfo[post.channel_id]; + if (!postInfo) { + // the post that has been deleted is in a channel that we haven't seen so just ignore it + return; + } + const postList = this.postsInfo[post.channel_id].postList; if (isPostListNull(postList)) {