From 75deb5584495f07247772eb65b42ef68b983b4eb Mon Sep 17 00:00:00 2001 From: Luke Barnard Date: Mon, 13 Feb 2017 11:48:03 +0000 Subject: [PATCH] Null check on teamName --- src/components/structures/MatrixChat.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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]; } }