Skip to content
This repository has been archived by the owner on Mar 25, 2023. It is now read-only.

Commit

Permalink
fix(login): add proper redirect from next=login query param
Browse files Browse the repository at this point in the history
Closes #376
  • Loading branch information
ksendart authored and zolotyx committed Aug 11, 2017
1 parent db47c3d commit 3f67c43
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/app/auth/login.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,9 @@ export class LoginComponent implements OnInit {
}

private handleLogin(): void {
const next = this.route.snapshot.queryParams['next'] || '';
const next = this.route.snapshot.queryParams['next'] &&
this.route.snapshot.queryParams['next'] !== '/login' &&
this.route.snapshot.queryParams['next'] !== 'login' ? this.route.snapshot.queryParams['next'] : '';
this.router.navigateByUrl(next);
}

Expand Down

0 comments on commit 3f67c43

Please sign in to comment.