Skip to content
This repository has been archived by the owner on Sep 11, 2024. It is now read-only.

Commit

Permalink
Add a null guard for serverConfig
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
turt2live committed May 21, 2019
1 parent acec7f5 commit 7c8d322
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/components/structures/MatrixChat.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 7c8d322

Please sign in to comment.