Merge pull request #3350 from matrix-org/dbkr/dont_infinite_loop_on_server_change
Don't infinite loop on server change
This commit is contained in:
commit
86fcaa2af0
1 changed files with 6 additions and 1 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue