You've already forked matrix-react-sdk
mirror of
https://github.com/matrix-org/matrix-react-sdk.git
synced 2025-11-08 21:42:24 +03:00
Don't clear field on failure
This commit is contained in:
@@ -131,15 +131,18 @@ export default class SetIdServer extends React.Component {
|
|||||||
const fullUrl = unabbreviateUrl(this.state.idServer);
|
const fullUrl = unabbreviateUrl(this.state.idServer);
|
||||||
|
|
||||||
const errStr = await checkIsUrl(fullUrl);
|
const errStr = await checkIsUrl(fullUrl);
|
||||||
|
|
||||||
|
let newFormValue = this.state.idServer;
|
||||||
if (!errStr) {
|
if (!errStr) {
|
||||||
MatrixClientPeg.get().setIdentityServerUrl(fullUrl);
|
MatrixClientPeg.get().setIdentityServerUrl(fullUrl);
|
||||||
localStorage.setItem("mx_is_url", fullUrl);
|
localStorage.setItem("mx_is_url", fullUrl);
|
||||||
|
newFormValue = '';
|
||||||
}
|
}
|
||||||
this.setState({
|
this.setState({
|
||||||
busy: false,
|
busy: false,
|
||||||
error: errStr,
|
error: errStr,
|
||||||
currentClientIdServer: MatrixClientPeg.get().getIdentityServerUrl(),
|
currentClientIdServer: MatrixClientPeg.get().getIdentityServerUrl(),
|
||||||
idServer: '',
|
idServer: newFormValue,
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user