You've already forked element-web
mirror of
https://github.com/element-hq/element-web.git
synced 2025-12-01 09:58:03 +03:00
Null check on teamName
This commit is contained in:
@@ -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];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user