diff options
author | Corey Hulen <corey@hulen.com> | 2015-11-02 14:18:41 -0800 |
---|---|---|
committer | Corey Hulen <corey@hulen.com> | 2015-11-02 14:18:41 -0800 |
commit | 3128920be991463c4fcfaebb146c7c8f89d680a8 (patch) | |
tree | 3f766fa26f0d5a1c434bffd3a43cadfbed6a64b9 /web/react | |
parent | 1086297336b05af6861e05b2023df6044284aba6 (diff) | |
parent | 1d6b470092f87dc40ab42ce49272a7fc517e19bb (diff) | |
download | chat-3128920be991463c4fcfaebb146c7c8f89d680a8.tar.gz chat-3128920be991463c4fcfaebb146c7c8f89d680a8.tar.bz2 chat-3128920be991463c4fcfaebb146c7c8f89d680a8.zip |
Merge pull request #1277 from rgarmsen2295/plt-550-refactor-fix
Brings back deleted parent fix lost in center post list refactor
Diffstat (limited to 'web/react')
-rw-r--r-- | web/react/components/posts_view.jsx | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/web/react/components/posts_view.jsx b/web/react/components/posts_view.jsx index f5a492b85..2b81d1d79 100644 --- a/web/react/components/posts_view.jsx +++ b/web/react/components/posts_view.jsx @@ -4,6 +4,7 @@ const UserStore = require('../stores/user_store.jsx'); const Utils = require('../utils/utils.jsx'); const Post = require('./post.jsx'); +const Constants = require('../utils/constants.jsx'); export default class PostsView extends React.Component { constructor(props) { @@ -69,6 +70,11 @@ export default class PostsView extends React.Component { const parentPost = posts[post.parent_id]; const prevPost = posts[order[i + 1]]; + // 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; + } + let sameUser = false; let sameRoot = false; let hideProfilePic = false; |