summaryrefslogtreecommitdiffstats
path: root/webapp/components
diff options
context:
space:
mode:
Diffstat (limited to 'webapp/components')
-rw-r--r--webapp/components/admin_console/select_team_modal.jsx28
1 files changed, 13 insertions, 15 deletions
diff --git a/webapp/components/admin_console/select_team_modal.jsx b/webapp/components/admin_console/select_team_modal.jsx
index ed6d33056..6a1fe9bea 100644
--- a/webapp/components/admin_console/select_team_modal.jsx
+++ b/webapp/components/admin_console/select_team_modal.jsx
@@ -29,20 +29,18 @@ export default class SelectTeamModal extends React.Component {
}
var options = [];
-
- for (var key in this.props.teams) {
- if (this.props.teams.hasOwnProperty(key)) {
- var team = this.props.teams[key];
- options.push(
- <option
- key={'opt_' + team.id}
- value={team.id}
- >
- {team.name}
- </option>
- );
- }
- }
+ var teams = this.props.teams;
+ Reflect.ownKeys(teams).forEach((key) => {
+ var team = teams[key];
+ options.push(
+ <option
+ key={'opt_' + team.id}
+ value={team.id}
+ >
+ {team.display_name}
+ </option>
+ );
+ });
return (
<Modal
@@ -112,4 +110,4 @@ SelectTeamModal.propTypes = {
show: React.PropTypes.bool.isRequired,
onModalSubmit: React.PropTypes.func,
onModalDismissed: React.PropTypes.func
-}; \ No newline at end of file
+};