forked from mystiq/hydrogen-web
Do not set error message to empty string
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
This commit is contained in:
parent
c9fbafb909
commit
ecfdc314d5
3 changed files with 4 additions and 3 deletions
|
@ -37,7 +37,6 @@ export class CompleteSSOLoginViewModel extends ViewModel {
|
|||
_showError(message) {
|
||||
this._errorMessage = message;
|
||||
this.emitChange("errorMessage");
|
||||
this._errorMessage = "";
|
||||
}
|
||||
|
||||
async performSSOLoginCompletion() {
|
||||
|
|
|
@ -114,7 +114,6 @@ export class LoginViewModel extends ViewModel {
|
|||
_showError(message) {
|
||||
this._errorMessage = message;
|
||||
this.emitChange("errorMessage");
|
||||
this._errorMessage = "";
|
||||
}
|
||||
|
||||
_toggleBusy(status) {
|
||||
|
@ -180,6 +179,8 @@ export class LoginViewModel extends ViewModel {
|
|||
}
|
||||
|
||||
updateHomeServer(newHomeserver) {
|
||||
this._errorMessage = "";
|
||||
this.emitChange("errorMessage");
|
||||
this._homeserver = newHomeserver;
|
||||
this._disposeViewModels();
|
||||
this._createViewModels(newHomeserver);
|
||||
|
|
|
@ -38,10 +38,11 @@ export class PasswordLoginViewModel extends ViewModel {
|
|||
_showError(message) {
|
||||
this._errorMessage = message;
|
||||
this.emitChange("errorMessage");
|
||||
this._errorMessage = "";
|
||||
}
|
||||
|
||||
async login(username, password) {
|
||||
this._errorMessage = "";
|
||||
this.emitChange("errorMessage");
|
||||
const loginMethod = this._loginOptions.password(username, password);
|
||||
const status = await this._attemptLogin(loginMethod);
|
||||
let error = "";
|
||||
|
|
Loading…
Reference in a new issue