Fix invites to groups without names

This commit is contained in:
Luke Barnard 2017-10-19 15:47:52 +01:00
parent e324511143
commit ea1dbe1f76
2 changed files with 6 additions and 8 deletions

View file

@ -38,19 +38,17 @@ export default React.createClass({
const BaseAvatar = sdk.getComponent('avatars.BaseAvatar');
const EmojiText = sdk.getComponent('elements.EmojiText');
const av = (
<BaseAvatar name={this.props.group.name} width={24} height={24}
url={this.props.group.avatarUrl}
/>
);
const groupName = this.props.group.name || this.props.group.groupId;
const av = <BaseAvatar name={groupName} width={24} height={24} url={this.props.group.avatarUrl} />;
const label = <EmojiText
element="div"
title={this.props.group.name}
title={groupName}
className="mx_GroupInviteTile_name"
dir="auto"
>
{ this.props.group.name }
{ groupName }
</EmojiText>;
const badge = <div className="mx_GroupInviteTile_badge">!</div>;