summaryrefslogtreecommitdiffstats
path: root/web/react/components/post_list.jsx
diff options
context:
space:
mode:
authorJoram Wilander <jwawilander@gmail.com>2015-11-02 08:03:28 -0500
committerJoram Wilander <jwawilander@gmail.com>2015-11-02 08:03:28 -0500
commitab418ed67ebe6245eaf108145a82939523d3c7f5 (patch)
treed98e72fb684415545e7b2bb6a67353275389aa8b /web/react/components/post_list.jsx
parent2ba0f1fe2c5384e7fa815aa8682f298eddd89985 (diff)
parent713380df1c5e0015e125d44a2c132523dcacf4d0 (diff)
downloadchat-ab418ed67ebe6245eaf108145a82939523d3c7f5.tar.gz
chat-ab418ed67ebe6245eaf108145a82939523d3c7f5.tar.bz2
chat-ab418ed67ebe6245eaf108145a82939523d3c7f5.zip
Merge pull request #1222 from rgarmsen2295/plt-550
PLT-550 Fixed various issues with commenting on recently deleted posts
Diffstat (limited to 'web/react/components/post_list.jsx')
-rw-r--r--web/react/components/post_list.jsx5
1 files changed, 5 insertions, 0 deletions
diff --git a/web/react/components/post_list.jsx b/web/react/components/post_list.jsx
index b9741bac4..444736db5 100644
--- a/web/react/components/post_list.jsx
+++ b/web/react/components/post_list.jsx
@@ -556,6 +556,11 @@ export default class PostList extends React.Component {
var post = posts[order[i]];
var parentPost = posts[post.parent_id];
+ // If the post is a comment whose parent has been deleted, don't add it to the list.
+ if (parentPost && parentPost.state === Constants.POST_DELETED) {
+ continue;
+ }
+
var sameUser = false;
var sameRoot = false;
var hideProfilePic = false;