summaryrefslogtreecommitdiffstats
path: root/web
diff options
context:
space:
mode:
authorhmhealey <harrisonmhealey@gmail.com>2016-02-25 10:18:48 -0500
committerhmhealey <harrisonmhealey@gmail.com>2016-02-25 10:18:48 -0500
commit8154995e43d76fb46e57e005541078b15a231406 (patch)
treec6f2425b1e8d47362b81b1d58d8511cee23b2041 /web
parente66520ea47819851d0d3b28a68da9c2b8f6ea404 (diff)
downloadchat-8154995e43d76fb46e57e005541078b15a231406.tar.gz
chat-8154995e43d76fb46e57e005541078b15a231406.tar.bz2
chat-8154995e43d76fb46e57e005541078b15a231406.zip
Ignored posts deleted from channels that we haven't visited
Diffstat (limited to 'web')
-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)) {