summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRyan Wang <R-Wang97@users.noreply.github.com>2017-03-29 09:43:08 -0400
committerJoram Wilander <jwawilander@gmail.com>2017-03-29 09:43:08 -0400
commit31830ffc7b578de643f5748227e4b783ee0782dd (patch)
tree93253500b6e7f45f4bcf2ce01baf443fbb7208df
parent060b9f92c382052276fa784065af6b18eda70669 (diff)
downloadchat-31830ffc7b578de643f5748227e4b783ee0782dd.tar.gz
chat-31830ffc7b578de643f5748227e4b783ee0782dd.tar.bz2
chat-31830ffc7b578de643f5748227e4b783ee0782dd.zip
Add extra check before rendering emojis (#5879)
-rw-r--r--webapp/components/post_view/components/reaction_list_container.jsx20
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;
}
}