prefill id server box with default if there isn't one

pull/21833/head
David Baker 2019-08-13 17:55:10 +01:00
parent 596ff93049
commit c80c8dcf24
1 changed files with 5 additions and 3 deletions

View File

@ -85,9 +85,11 @@ export default class SetIdServer extends React.Component {
constructor() { constructor() {
super(); super();
let defaultIdServer = abbreviateUrl(MatrixClientPeg.get().getIdentityServerUrl()); let defaultIdServer = '';
if (!defaultIdServer) { if (!MatrixClientPeg.get().getIdentityServerUrl() && SdkConfig.get()['validated_server_config']['isUrl']) {
defaultIdServer = abbreviateUrl(SdkConfig.get()['validated_server_config']['idServer']) || ''; // If no ID server is configured but there's one in the config, prepopulate
// the field to help the user.
defaultIdServer = abbreviateUrl(SdkConfig.get()['validated_server_config']['isUrl']);
} }
this.state = { this.state = {