diff options
author | Ryan Wang <R-Wang97@users.noreply.github.com> | 2017-03-29 09:43:08 -0400 |
---|---|---|
committer | Joram Wilander <jwawilander@gmail.com> | 2017-03-29 09:43:08 -0400 |
commit | 31830ffc7b578de643f5748227e4b783ee0782dd (patch) | |
tree | 93253500b6e7f45f4bcf2ce01baf443fbb7208df /webapp | |
parent | 060b9f92c382052276fa784065af6b18eda70669 (diff) | |
download | chat-31830ffc7b578de643f5748227e4b783ee0782dd.tar.gz chat-31830ffc7b578de643f5748227e4b783ee0782dd.tar.bz2 chat-31830ffc7b578de643f5748227e4b783ee0782dd.zip |
Add extra check before rendering emojis (#5879)
Diffstat (limited to 'webapp')
-rw-r--r-- | webapp/components/post_view/components/reaction_list_container.jsx | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/webapp/components/post_view/components/reaction_list_container.jsx b/webapp/components/post_view/components/reaction_list_container.jsx index e21bfa24b..3ee8f73a3 100644 --- a/webapp/components/post_view/components/reaction_list_container.jsx +++ b/webapp/components/post_view/components/reaction_list_container.jsx @@ -82,17 +82,17 @@ export default class ReactionListContainer extends React.Component { } render() { - if (!this.props.post.has_reactions) { - return null; + if (this.props.post.has_reactions && this.state.reactions.length > 0) { + return ( + <ReactionListView + post={this.props.post} + currentUserId={this.props.currentUserId} + reactions={this.state.reactions} + emojis={this.state.emojis} + /> + ); } - return ( - <ReactionListView - post={this.props.post} - currentUserId={this.props.currentUserId} - reactions={this.state.reactions} - emojis={this.state.emojis} - /> - ); + return null; } } |