summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--web/react/stores/post_store.jsx6
1 files changed, 6 insertions, 0 deletions
diff --git a/web/react/stores/post_store.jsx b/web/react/stores/post_store.jsx
index 5100a4936..1dc0dc9bf 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)) {