aboutsummaryrefslogtreecommitdiffhomepage
path: root/client
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2020-12-29 15:23:03 +0100
committerChocobozzz <me@florianbigard.com>2020-12-29 15:23:03 +0100
commit2345e1385312ed3194f572ce30235783662b1ac2 (patch)
tree32d8c27af075d97088fe3f126201eea6ee7013d4 /client
parentf88453e2335ec9140df927d3cca727d2a3a4ab70 (diff)
downloadPeerTube-2345e1385312ed3194f572ce30235783662b1ac2.tar.gz
PeerTube-2345e1385312ed3194f572ce30235783662b1ac2.tar.zst
PeerTube-2345e1385312ed3194f572ce30235783662b1ac2.zip
Fix login error display
Diffstat (limited to 'client')
-rw-r--r--client/src/app/+login/login.component.ts11
1 files changed, 6 insertions, 5 deletions
diff --git a/client/src/app/+login/login.component.ts b/client/src/app/+login/login.component.ts
index 2567f21f1..af747b7fa 100644
--- a/client/src/app/+login/login.component.ts
+++ b/client/src/app/+login/login.component.ts
@@ -71,6 +71,12 @@ export class LoginComponent extends FormReactive implements OnInit, AfterViewIni
71 ngOnInit () { 71 ngOnInit () {
72 const snapshot = this.route.snapshot 72 const snapshot = this.route.snapshot
73 73
74 // Avoid undefined errors when accessing form error properties
75 this.buildForm({
76 username: LOGIN_USERNAME_VALIDATOR,
77 password: LOGIN_PASSWORD_VALIDATOR
78 })
79
74 this.serverConfig = snapshot.data.serverConfig 80 this.serverConfig = snapshot.data.serverConfig
75 81
76 if (snapshot.queryParams.externalAuthToken) { 82 if (snapshot.queryParams.externalAuthToken) {
@@ -82,11 +88,6 @@ export class LoginComponent extends FormReactive implements OnInit, AfterViewIni
82 this.externalAuthError = true 88 this.externalAuthError = true
83 return 89 return
84 } 90 }
85
86 this.buildForm({
87 username: LOGIN_USERNAME_VALIDATOR,
88 password: LOGIN_PASSWORD_VALIDATOR
89 })
90 } 91 }
91 92
92 ngAfterViewInit () { 93 ngAfterViewInit () {