mirror of
https://github.com/vector-im/hydrogen-web.git
synced 2024-12-23 03:25:12 +01:00
Do not set error message to empty string
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
This commit is contained in:
parent
c9fbafb909
commit
ecfdc314d5
@ -37,7 +37,6 @@ export class CompleteSSOLoginViewModel extends ViewModel {
|
|||||||
_showError(message) {
|
_showError(message) {
|
||||||
this._errorMessage = message;
|
this._errorMessage = message;
|
||||||
this.emitChange("errorMessage");
|
this.emitChange("errorMessage");
|
||||||
this._errorMessage = "";
|
|
||||||
}
|
}
|
||||||
|
|
||||||
async performSSOLoginCompletion() {
|
async performSSOLoginCompletion() {
|
||||||
|
@ -114,7 +114,6 @@ export class LoginViewModel extends ViewModel {
|
|||||||
_showError(message) {
|
_showError(message) {
|
||||||
this._errorMessage = message;
|
this._errorMessage = message;
|
||||||
this.emitChange("errorMessage");
|
this.emitChange("errorMessage");
|
||||||
this._errorMessage = "";
|
|
||||||
}
|
}
|
||||||
|
|
||||||
_toggleBusy(status) {
|
_toggleBusy(status) {
|
||||||
@ -180,6 +179,8 @@ export class LoginViewModel extends ViewModel {
|
|||||||
}
|
}
|
||||||
|
|
||||||
updateHomeServer(newHomeserver) {
|
updateHomeServer(newHomeserver) {
|
||||||
|
this._errorMessage = "";
|
||||||
|
this.emitChange("errorMessage");
|
||||||
this._homeserver = newHomeserver;
|
this._homeserver = newHomeserver;
|
||||||
this._disposeViewModels();
|
this._disposeViewModels();
|
||||||
this._createViewModels(newHomeserver);
|
this._createViewModels(newHomeserver);
|
||||||
|
@ -38,10 +38,11 @@ export class PasswordLoginViewModel extends ViewModel {
|
|||||||
_showError(message) {
|
_showError(message) {
|
||||||
this._errorMessage = message;
|
this._errorMessage = message;
|
||||||
this.emitChange("errorMessage");
|
this.emitChange("errorMessage");
|
||||||
this._errorMessage = "";
|
|
||||||
}
|
}
|
||||||
|
|
||||||
async login(username, password) {
|
async login(username, password) {
|
||||||
|
this._errorMessage = "";
|
||||||
|
this.emitChange("errorMessage");
|
||||||
const loginMethod = this._loginOptions.password(username, password);
|
const loginMethod = this._loginOptions.password(username, password);
|
||||||
const status = await this._attemptLogin(loginMethod);
|
const status = await this._attemptLogin(loginMethod);
|
||||||
let error = "";
|
let error = "";
|
||||||
|
Loading…
Reference in New Issue
Block a user