From b247a132709eb212fef4f77c4912dc0ec108f36b Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Wed, 29 May 2019 14:39:49 +0200 Subject: Add success icon on registration --- client/src/app/core/routing/redirect.service.ts | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'client/src/app/core/routing/redirect.service.ts') diff --git a/client/src/app/core/routing/redirect.service.ts b/client/src/app/core/routing/redirect.service.ts index e1db4097b..571822b76 100644 --- a/client/src/app/core/routing/redirect.service.ts +++ b/client/src/app/core/routing/redirect.service.ts @@ -42,7 +42,14 @@ export class RedirectService { } redirectToPreviousRoute () { - if (this.previousUrl) return this.router.navigateByUrl(this.previousUrl) + const exceptions = [ + '/verify-account' + ] + + if (this.previousUrl) { + const isException = exceptions.find(e => this.previousUrl.startsWith(e)) + if (!isException) return this.router.navigateByUrl(this.previousUrl) + } return this.redirectToHomepage() } -- cgit v1.2.3