diff options
author | Myeonghyeon-Lee <mhyeon.lee@navercorp.com> | 2016-08-25 00:05:39 +0900 |
---|---|---|
committer | Joram Wilander <jwawilander@gmail.com> | 2016-08-24 11:05:39 -0400 |
commit | 23815a696c0cb6011c8288b29b9e01c55181c9ae (patch) | |
tree | 90f6f3a15dc0a7f523cd70b8dd496294cdfa6455 /webapp/components/admin_console | |
parent | 03fd4bc4e61db20a93685d7dc7854d45791a960c (diff) | |
download | chat-23815a696c0cb6011c8288b29b9e01c55181c9ae.tar.gz chat-23815a696c0cb6011c8288b29b9e01c55181c9ae.tar.bz2 chat-23815a696c0cb6011c8288b29b9e01c55181c9ae.zip |
fix for team.display_name instead of team.name (#3827)
Diffstat (limited to 'webapp/components/admin_console')
-rw-r--r-- | webapp/components/admin_console/select_team_modal.jsx | 28 |
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 +}; |