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.
pull/21833/head
Travis Ralston 2019-05-20 20:02:02 -06:00
parent 595b490fd7
commit 7ecab35062
1 changed files with 1 additions and 1 deletions

View File

@ -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;