Null check on teamName

pull/21833/head
Luke Barnard 2017-02-13 11:48:03 +00:00
parent bdd031eac2
commit 75deb55844
1 changed files with 1 additions and 1 deletions

View File

@ -197,7 +197,7 @@ module.exports = React.createClass({
let routedTeamToken = null;
if (this.props.config.teamTokenMap) {
const teamName = window.location.pathname.split('/')[1];
if (this.props.config.teamTokenMap.hasOwnProperty(teamName)) {
if (teamName && this.props.config.teamTokenMap.hasOwnProperty(teamName)) {
routedTeamToken = this.props.config.teamTokenMap[teamName];
}
}