mirror of https://github.com/vector-im/riot-web
Null check on teamName
parent
bdd031eac2
commit
75deb55844
|
@ -197,7 +197,7 @@ module.exports = React.createClass({
|
||||||
let routedTeamToken = null;
|
let routedTeamToken = null;
|
||||||
if (this.props.config.teamTokenMap) {
|
if (this.props.config.teamTokenMap) {
|
||||||
const teamName = window.location.pathname.split('/')[1];
|
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];
|
routedTeamToken = this.props.config.teamTokenMap[teamName];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue