Fix login error display

pull/3538/head
Chocobozzz 2020-12-29 15:23:03 +01:00
parent f88453e233
commit 2345e13853
No known key found for this signature in database
GPG Key ID: 583A612D890159BE
1 changed files with 6 additions and 5 deletions

View File

@ -71,6 +71,12 @@ export class LoginComponent extends FormReactive implements OnInit, AfterViewIni
ngOnInit () {
const snapshot = this.route.snapshot
// Avoid undefined errors when accessing form error properties
this.buildForm({
username: LOGIN_USERNAME_VALIDATOR,
password: LOGIN_PASSWORD_VALIDATOR
})
this.serverConfig = snapshot.data.serverConfig
if (snapshot.queryParams.externalAuthToken) {
@ -82,11 +88,6 @@ export class LoginComponent extends FormReactive implements OnInit, AfterViewIni
this.externalAuthError = true
return
}
this.buildForm({
username: LOGIN_USERNAME_VALIDATOR,
password: LOGIN_PASSWORD_VALIDATOR
})
}
ngAfterViewInit () {