mirror of
https://github.com/mattermost/mattermost.git
synced 2026-09-24 16:05:00 +08:00
Add extra check before rendering emojis (#5879)
This commit is contained in:
committed by
Joram Wilander
parent
060b9f92c3
commit
31830ffc7b
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user