diff options
author | Antti Ahti <antti.ahti@gmail.com> | 2015-10-15 19:35:45 +0300 |
---|---|---|
committer | Antti Ahti <antti.ahti@gmail.com> | 2015-10-15 19:35:45 +0300 |
commit | 7abde676a1828714c71b25184fdd91a81c2d77a1 (patch) | |
tree | a52b57c8464f9fbf86d40cab712c8d16909c4a86 /web/react/components | |
parent | c0809bbc3fc7a9630659872850c313eb6df701d9 (diff) | |
download | chat-7abde676a1828714c71b25184fdd91a81c2d77a1.tar.gz chat-7abde676a1828714c71b25184fdd91a81c2d77a1.tar.bz2 chat-7abde676a1828714c71b25184fdd91a81c2d77a1.zip |
Fix lint
Diffstat (limited to 'web/react/components')
-rw-r--r-- | web/react/components/navbar_dropdown.jsx | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/web/react/components/navbar_dropdown.jsx b/web/react/components/navbar_dropdown.jsx index 564a64f48..dc41775c7 100644 --- a/web/react/components/navbar_dropdown.jsx +++ b/web/react/components/navbar_dropdown.jsx @@ -15,19 +15,18 @@ function getStateFromStores() { let teamsObject = UserStore.getTeams(); for (let teamId in teamsObject) { if (teamsObject.hasOwnProperty(teamId)) { - teams.push(teamsObject[teamId]) + teams.push(teamsObject[teamId]); } } - teams.sort(function (teamA, teamB) { + teams.sort(function sortByDisplayName(teamA, teamB) { let teamADisplayName = teamA.display_name.toLowerCase(); let teamBDisplayName = teamB.display_name.toLowerCase(); if (teamADisplayName < teamBDisplayName) { - return -1 + return -1; } else if (teamADisplayName > teamBDisplayName) { return 1; - } else { - return 0; } + return 0; }); return {teams}; } |