mirror of
https://github.com/element-hq/element-web
synced 2024-11-25 02:35:48 +03:00
Don't clear field on failure
This commit is contained in:
parent
bc66545fd0
commit
10b19622db
1 changed files with 4 additions and 1 deletions
|
@ -131,15 +131,18 @@ export default class SetIdServer extends React.Component {
|
|||
const fullUrl = unabbreviateUrl(this.state.idServer);
|
||||
|
||||
const errStr = await checkIsUrl(fullUrl);
|
||||
|
||||
let newFormValue = this.state.idServer;
|
||||
if (!errStr) {
|
||||
MatrixClientPeg.get().setIdentityServerUrl(fullUrl);
|
||||
localStorage.setItem("mx_is_url", fullUrl);
|
||||
newFormValue = '';
|
||||
}
|
||||
this.setState({
|
||||
busy: false,
|
||||
error: errStr,
|
||||
currentClientIdServer: MatrixClientPeg.get().getIdentityServerUrl(),
|
||||
idServer: '',
|
||||
idServer: newFormValue,
|
||||
});
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in a new issue