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

Commit

Permalink
Merge pull request #3350 from matrix-org/dbkr/dont_infinite_loop_on_s…
Browse files Browse the repository at this point in the history
…erver_change

Don't infinite loop on server change
  • Loading branch information
dbkr authored Aug 28, 2019
2 parents 8e799b7 + ac2b8b8 commit 86fcaa2
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/components/views/auth/ServerConfig.js
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,12 @@ export default class ServerConfig extends React.PureComponent {
// Always try and use the defaults first
const defaultConfig: ValidatedServerConfig = SdkConfig.get()["validated_server_config"];
if (defaultConfig.hsUrl === hsUrl && defaultConfig.isUrl === isUrl) {
this.setState({busy: false, errorText: ""});
this.setState({
hsUrl: defaultConfig.hsUrl,
isUrl: defaultConfig.isUrl,
busy: false,
errorText: "",
});
this.props.onServerConfigChange(defaultConfig);
return defaultConfig;
}
Expand Down

0 comments on commit 86fcaa2

Please sign in to comment.