diff --git a/src/components/views/groups/GroupMemberList.js b/src/components/views/groups/GroupMemberList.js
index 6cbbc968a7..a5ab22eb0e 100644
--- a/src/components/views/groups/GroupMemberList.js
+++ b/src/components/views/groups/GroupMemberList.js
@@ -106,12 +106,11 @@ export default withMatrixClient(React.createClass({
});
}
- memberList = memberList.map((m, index) => {
- return (
-
- );
+ const uniqueMembers = {};
+ memberList.forEach((m) => {
+ if (!uniqueMembers[m.userId]) uniqueMembers[m.userId] = m;
});
-
+ memberList = Object.keys(uniqueMembers).map((userId) => uniqueMembers[userId]);
memberList.sort((a, b) => {
// TODO: should put admins at the top: we don't yet have that info
if (a < b) {
@@ -123,10 +122,16 @@ export default withMatrixClient(React.createClass({
}
});
+ const memberTiles = memberList.map((m) => {
+ return (
+
+ );
+ });
+
return
- { memberList }
+ { memberTiles }
;
},