From 7ecab350628f4454058d25406dc2b5c414ca52ca Mon Sep 17 00:00:00 2001 From: Travis Ralston Date: Mon, 20 May 2019 20:02:02 -0600 Subject: [PATCH] Add a null guard for serverConfig This is often null while the component is on its first render, and is called during that render. It is eventually populated by React, and the function re-called - we just have to be patient. --- 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 38f597f673..ac328f8387 100644 --- a/src/components/structures/MatrixChat.js +++ b/src/components/structures/MatrixChat.js @@ -204,7 +204,7 @@ export default React.createClass({ }, getFallbackHsUrl: function() { - if (this.props.serverConfig.isDefault) { + if (this.props.serverConfig && this.props.serverConfig.isDefault) { return this.props.config.fallback_hs_url; } else { return null;