From 3d30db81e0d7571ae5208063320456563fb02f27 Mon Sep 17 00:00:00 2001 From: Luke Barnard Date: Tue, 7 Feb 2017 15:24:57 +0000 Subject: [PATCH] Only init RTS if configured correctly --- src/components/structures/MatrixChat.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/components/structures/MatrixChat.js b/src/components/structures/MatrixChat.js index 3e57684ac2..73c8ed21d3 100644 --- a/src/components/structures/MatrixChat.js +++ b/src/components/structures/MatrixChat.js @@ -210,7 +210,11 @@ module.exports = React.createClass({ window.addEventListener('resize', this.handleResize); this.handleResize(); - Lifecycle.initRtsClient(this.props.config.teamServerConfig.teamServerURL); + if (this.props.config.teamServerConfig && + this.props.config.teamServerConfig.teamServerURL + ) { + Lifecycle.initRtsClient(this.props.config.teamServerConfig.teamServerURL); + } // the extra q() ensures that synchronous exceptions hit the same codepath as // asynchronous ones.