diff options
author | Ryan Wang <R-Wang97@users.noreply.github.com> | 2016-09-12 10:00:15 -0400 |
---|---|---|
committer | Christopher Speller <crspeller@gmail.com> | 2016-09-12 10:00:15 -0400 |
commit | b8d6eba7889ac84220badef64a5d0fdccd704f06 (patch) | |
tree | fec123d11a906abc34f5bde4ccacdbe23fea0bd7 /webapp | |
parent | e557f42673b758435d4df2c5abab16b8fc9d8e76 (diff) | |
download | chat-b8d6eba7889ac84220badef64a5d0fdccd704f06.tar.gz chat-b8d6eba7889ac84220badef64a5d0fdccd704f06.tar.bz2 chat-b8d6eba7889ac84220badef64a5d0fdccd704f06.zip |
Team names in system console are sorted alphabetically regardless of case (#3958)
Diffstat (limited to 'webapp')
-rw-r--r-- | webapp/components/admin_console/select_team_modal.jsx | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/webapp/components/admin_console/select_team_modal.jsx b/webapp/components/admin_console/select_team_modal.jsx index 2ea6cc58c..a661dd2f0 100644 --- a/webapp/components/admin_console/select_team_modal.jsx +++ b/webapp/components/admin_console/select_team_modal.jsx @@ -25,10 +25,13 @@ export default class SelectTeamModal extends React.Component { this.props.onModalDismissed(); } compare(a, b) { - if (a.display_name < b.display_name) { + const teamA = a.display_name.toLowerCase(); + const teamB = b.display_name.toLowerCase(); + + if (teamA < teamB) { return -1; } - if (a.display_name > b.display_name) { + if (teamA > teamB) { return 1; } return 0; |