diff options
author | Harrison Healey <harrisonmhealey@gmail.com> | 2016-11-08 11:47:42 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-11-08 11:47:42 -0500 |
commit | 13dcccc60bba90f0883aae63e72aac896a6f553c (patch) | |
tree | a51b6b72fbd9fe5ef3d8e2e4c7279b790cbf015f /webapp/components | |
parent | cb281ac714309eb54bfe96de45756999c4658a3c (diff) | |
download | chat-13dcccc60bba90f0883aae63e72aac896a6f553c.tar.gz chat-13dcccc60bba90f0883aae63e72aac896a6f553c.tar.bz2 chat-13dcccc60bba90f0883aae63e72aac896a6f553c.zip |
PLT-4205 Fixed pending posts always being considered as part of a post thread (#4488)
Diffstat (limited to 'webapp/components')
-rw-r--r-- | webapp/components/post_view/components/post_list.jsx | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/webapp/components/post_view/components/post_list.jsx b/webapp/components/post_view/components/post_list.jsx index 400f516cc..a0cfb208e 100644 --- a/webapp/components/post_view/components/post_list.jsx +++ b/webapp/components/post_view/components/post_list.jsx @@ -272,11 +272,13 @@ export default class PostList extends React.Component { commentRootId = post.id; } - for (const postId in posts) { - if (posts[postId].root_id === commentRootId) { - commentCount += 1; - if (posts[postId].user_id === userId) { - shouldHighlightThreads = true; + if (commentRootId) { + for (const postId in posts) { + if (posts[postId].root_id === commentRootId) { + commentCount += 1; + if (posts[postId].user_id === userId) { + shouldHighlightThreads = true; + } } } } |