Commit 31830ffc authored by Ryan Wang's avatar Ryan Wang Committed by Joram Wilander
Browse files

Add extra check before rendering emojis (#5879)

parent 060b9f92
......@@ -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;
}
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment