From 5e3c85a8974f99e38ebbb08b03b5501090bb4572 Mon Sep 17 00:00:00 2001 From: Igor Kulikov Date: Thu, 9 Apr 2020 18:39:58 +0300 Subject: [PATCH] UI: Fix login url params --- .../src/app/modules/login/pages/login/login.component.ts | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/ui-ngx/src/app/modules/login/pages/login/login.component.ts b/ui-ngx/src/app/modules/login/pages/login/login.component.ts index b549f94bcc..7e3f99239f 100644 --- a/ui-ngx/src/app/modules/login/pages/login/login.component.ts +++ b/ui-ngx/src/app/modules/login/pages/login/login.component.ts @@ -23,7 +23,7 @@ import { FormBuilder } from '@angular/forms'; import { HttpErrorResponse } from '@angular/common/http'; import { Constants } from '@shared/models/constants'; import { Router } from '@angular/router'; -import { ActivatedRoute } from "@angular/router"; +import { ActivatedRoute } from '@angular/router'; @Component({ selector: 'tb-login', @@ -46,8 +46,9 @@ export class LoginComponent extends PageComponent implements OnInit { } ngOnInit() { - if (this.route.snapshot.queryParams["username"] && this.route.snapshot.queryParams["password"]) { - this.loginFormGroup.setValue({username: this.route.snapshot.queryParams["username"], password: this.route.snapshot.queryParams["password"]}); + if (this.route.snapshot.queryParams.username && this.route.snapshot.queryParams.password) { + this.loginFormGroup.setValue({username: this.route.snapshot.queryParams.username, + password: this.route.snapshot.queryParams.password}); this.login(); } }