From 14eee9a37a343f04ed46f524e03c740f85ef79c0 Mon Sep 17 00:00:00 2001 From: Luke Barnard Date: Mon, 16 Oct 2017 17:59:53 +0100 Subject: [PATCH 1/2] Only show invited section if there are invited group members --- src/components/views/groups/GroupMemberList.js | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/components/views/groups/GroupMemberList.js b/src/components/views/groups/GroupMemberList.js index f800130a32..d504ecf21c 100644 --- a/src/components/views/groups/GroupMemberList.js +++ b/src/components/views/groups/GroupMemberList.js @@ -161,10 +161,11 @@ export default withMatrixClient(React.createClass({ { this.makeGroupMemberTiles(this.state.searchQuery, this.state.members) } :
; - const invited = this.state.invitedMembers ?
-

{ _t("Invited") }

- { this.makeGroupMemberTiles(this.state.searchQuery, this.state.invitedMembers) } -
:
; + const invited = (this.state.invitedMembers || this.state.invitedMembers.length > 0) ? +
+

{ _t("Invited") }

+ { this.makeGroupMemberTiles(this.state.searchQuery, this.state.invitedMembers) } +
:
; return (
From 85d99d429d624fc956065cca435465be0ff7c45d Mon Sep 17 00:00:00 2001 From: Luke Barnard Date: Tue, 17 Oct 2017 09:49:39 +0100 Subject: [PATCH 2/2] Use correct logic operator --- src/components/views/groups/GroupMemberList.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/views/groups/GroupMemberList.js b/src/components/views/groups/GroupMemberList.js index d504ecf21c..61032724e4 100644 --- a/src/components/views/groups/GroupMemberList.js +++ b/src/components/views/groups/GroupMemberList.js @@ -161,7 +161,7 @@ export default withMatrixClient(React.createClass({ { this.makeGroupMemberTiles(this.state.searchQuery, this.state.members) }
:
; - const invited = (this.state.invitedMembers || this.state.invitedMembers.length > 0) ? + const invited = (this.state.invitedMembers && this.state.invitedMembers.length > 0) ?

{ _t("Invited") }

{ this.makeGroupMemberTiles(this.state.searchQuery, this.state.invitedMembers) }