From 495673d80d75ddfc97dc8d9fe61021142418dcc2 Mon Sep 17 00:00:00 2001
From: Christopher Speller <crspeller@gmail.com>
Date: Fri, 16 Oct 2015 10:15:52 -0400
Subject: Fixing some client warnings

---
 web/react/components/popover_list_members.jsx | 24 +++++++++++++++++++-----
 1 file changed, 19 insertions(+), 5 deletions(-)

(limited to 'web/react/components/popover_list_members.jsx')

diff --git a/web/react/components/popover_list_members.jsx b/web/react/components/popover_list_members.jsx
index 16ae693fa..155e88600 100644
--- a/web/react/components/popover_list_members.jsx
+++ b/web/react/components/popover_list_members.jsx
@@ -35,13 +35,20 @@ export default class PopoverListMembers extends React.Component {
         const teamMembers = UserStore.getProfilesUsernameMap();
 
         if (members && teamMembers) {
-            members.sort(function compareByLocal(a, b) {
+            members.sort((a, b) => {
                 return a.username.localeCompare(b.username);
             });
 
-            members.forEach(function addMemberElement(m) {
+            members.forEach((m, i) => {
                 if (teamMembers[m.username] && teamMembers[m.username].delete_at <= 0) {
-                    popoverHtml.push(<div className='text--nowrap'>{m.username}</div>);
+                    popoverHtml.push(
+                        <div
+                            className='text--nowrap'
+                            key={'popover-member-' + i}
+                        >
+                            {m.username}
+                        </div>
+                    );
                     count++;
                 }
             });
@@ -57,8 +64,15 @@ export default class PopoverListMembers extends React.Component {
             <OverlayTrigger
                 trigger='click'
                 placement='bottom'
-                rootClose='true'
-                overlay={<Popover title='Members'>{popoverHtml}</Popover>}
+                rootClose={true}
+                overlay={
+                    <Popover
+                        title='Members'
+                        id='member-list-popover'
+                    >
+                        {popoverHtml}
+                    </Popover>
+                }
             >
             <div id='member_popover'>
                 <div>
-- 
cgit v1.2.3-1-g7c22

