You've already forked matrix-react-sdk
mirror of
https://github.com/matrix-org/matrix-react-sdk.git
synced 2025-11-08 21:42:24 +03:00
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.
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user