From dae5ca24b173aebd16de2a202ccd4088568b8dfb Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Tue, 11 Dec 2018 15:27:46 +0100 Subject: Redirect to the last url on login --- .../src/app/shared/user-subscription/subscribe-button.component.ts | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'client/src/app/shared') diff --git a/client/src/app/shared/user-subscription/subscribe-button.component.ts b/client/src/app/shared/user-subscription/subscribe-button.component.ts index 315ea5037..9c8a15023 100644 --- a/client/src/app/shared/user-subscription/subscribe-button.component.ts +++ b/client/src/app/shared/user-subscription/subscribe-button.component.ts @@ -50,11 +50,10 @@ export class SubscribeButtonComponent implements OnInit { subscribe () { if (this.isUserLoggedIn()) { - this.localSubscribe() - } else { - this.authService.redirectUrl = this.router.url - this.gotoLogin() + return this.localSubscribe() } + + return this.gotoLogin() } localSubscribe () { -- cgit v1.2.3