summaryrefslogtreecommitdiffstats
path: root/webapp/components/admin_console/select_team_modal.jsx
diff options
context:
space:
mode:
authorDebanshu Kundu <debanshu.kundu@joshtechnologygroup.com>2016-12-20 03:16:13 +0530
committerJoram Wilander <jwawilander@gmail.com>2016-12-19 16:46:13 -0500
commitc8cd3d22ad8f6c184ed2c5f4b285bf939b593572 (patch)
tree1fdd2675219b37b7b140e4b99489baa85997fee2 /webapp/components/admin_console/select_team_modal.jsx
parent58e8da11b1aa74327c360e7ca1e44aabee3001a3 (diff)
downloadchat-c8cd3d22ad8f6c184ed2c5f4b285bf939b593572.tar.gz
chat-c8cd3d22ad8f6c184ed2c5f4b285bf939b593572.tar.bz2
chat-c8cd3d22ad8f6c184ed2c5f4b285bf939b593572.zip
PLT-4977 Sorting teams by display name on team list at system console's menue and select team modal. (#4797)
Diffstat (limited to 'webapp/components/admin_console/select_team_modal.jsx')
-rw-r--r--webapp/components/admin_console/select_team_modal.jsx11
1 files changed, 1 insertions, 10 deletions
diff --git a/webapp/components/admin_console/select_team_modal.jsx b/webapp/components/admin_console/select_team_modal.jsx
index e407e61b4..14448d753 100644
--- a/webapp/components/admin_console/select_team_modal.jsx
+++ b/webapp/components/admin_console/select_team_modal.jsx
@@ -26,16 +26,7 @@ export default class SelectTeamModal extends React.Component {
}
compare(a, b) {
- const teamA = a.display_name.toLowerCase();
- const teamB = b.display_name.toLowerCase();
-
- if (teamA < teamB) {
- return -1;
- }
- if (teamA > teamB) {
- return 1;
- }
- return 0;
+ return a.display_name.localeCompare(b.display_name);
}
render() {