Fixed error thrown when viewing a channel containing an invalid emoji reaction (#7080)
* Added better error handling for when reacting with a non-existant emoji * Re-added emoji aliases ca, za, and pk
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
1026b7d84c
Коммит
0cc5854b64
@@ -23,13 +23,18 @@ function makeMapStateToProps() {
|
||||
emoji = ownProps.emojis.get(ownProps.emojiName);
|
||||
}
|
||||
|
||||
let emojiImageUrl = '';
|
||||
if (emoji) {
|
||||
emojiImageUrl = getEmojiImageUrl(emoji);
|
||||
}
|
||||
|
||||
return {
|
||||
...ownProps,
|
||||
profiles,
|
||||
otherUsersCount: ownProps.reactions.length - profiles.length,
|
||||
currentUserId: getCurrentUserId(state),
|
||||
reactionCount: ownProps.reactions.length,
|
||||
emojiImageUrl: getEmojiImageUrl(emoji)
|
||||
emojiImageUrl
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
@@ -93,6 +93,10 @@ export default class Reaction extends React.PureComponent {
|
||||
}
|
||||
|
||||
render() {
|
||||
if (!this.props.emojiImageUrl) {
|
||||
return null;
|
||||
}
|
||||
|
||||
let currentUserReacted = false;
|
||||
const users = [];
|
||||
const otherUsersCount = this.props.otherUsersCount;
|
||||
|
||||
Ссылка в новой задаче
Block a user