Skip to content
This repository has been archived by the owner on Sep 11, 2024. It is now read-only.

Only show invited section if there are invited group members #1489

Merged
merged 2 commits into from
Oct 17, 2017
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions src/components/views/groups/GroupMemberList.js
Original file line number Diff line number Diff line change
Expand Up @@ -161,10 +161,11 @@ export default withMatrixClient(React.createClass({
{ this.makeGroupMemberTiles(this.state.searchQuery, this.state.members) }
</div> : <div />;

const invited = this.state.invitedMembers ? <div className="mx_MemberList_invited">
<h2>{ _t("Invited") }</h2>
{ this.makeGroupMemberTiles(this.state.searchQuery, this.state.invitedMembers) }
</div> : <div />;
const invited = (this.state.invitedMembers || this.state.invitedMembers.length > 0) ?
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

as @t3chguy mentioned, && instead?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oops!

<div className="mx_MemberList_invited">
<h2>{ _t("Invited") }</h2>
{ this.makeGroupMemberTiles(this.state.searchQuery, this.state.invitedMembers) }
</div> : <div />;

return (
<div className="mx_MemberList">
Expand Down