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

Этот коммит содержится в:
Ryan Wang
2016-09-12 10:00:15 -04:00
коммит произвёл Christopher Speller
родитель e557f42673
Коммит b8d6eba788

Просмотреть файл

@@ -25,10 +25,13 @@ export default class SelectTeamModal extends React.Component {
this.props.onModalDismissed(); this.props.onModalDismissed();
} }
compare(a, b) { 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; return -1;
} }
if (a.display_name > b.display_name) { if (teamA > teamB) {
return 1; return 1;
} }
return 0; return 0;