Team names in system console are sorted alphabetically regardless of case (#3958)

This commit is contained in:
Ryan Wang
2016-09-12 10:00:15 -04:00
committed by Christopher Speller
parent e557f42673
commit b8d6eba788

View File

@@ -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;