diff --git a/src/components/structures/MatrixChat.js b/src/components/structures/MatrixChat.js index 75ae51e9e5..8d08c19001 100644 --- a/src/components/structures/MatrixChat.js +++ b/src/components/structures/MatrixChat.js @@ -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]; } }