Skip to content

Commit 868677f

Browse files
committed
feat: enhance password reset logic to handle missing key scenario
Signed-off-by: Manuel Abascal <mjabascal10@gmail.com>
1 parent 54495a7 commit 868677f

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

frontend/src/app/shared/components/auth/password-reset/finish/password-reset-finish.component.ts

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ export class PasswordResetFinishComponent implements OnInit, AfterViewInit {
2323

2424
constructor(
2525
private passwordResetFinishService: PasswordResetFinishService,
26-
private loginModalService: ModalService,
2726
private route: ActivatedRoute,
2827
private router: Router,
2928
private elementRef: ElementRef,
@@ -33,10 +32,14 @@ export class PasswordResetFinishComponent implements OnInit, AfterViewInit {
3332

3433
ngOnInit() {
3534
this.route.queryParams.subscribe(params => {
36-
this.key = params.key;
35+
if (params && params.key) {
36+
this.key = params.key;
37+
this.keyMissing = false
38+
} else {
39+
this.keyMissing = true;
40+
}
3741
});
3842
this.resetAccount = {};
39-
this.keyMissing = !this.key;
4043
}
4144

4245
ngAfterViewInit() {

0 commit comments

Comments
 (0)