diff options
Diffstat (limited to 'client/src/app/core')
-rw-r--r-- | client/src/app/core/routing/redirect.service.ts | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/client/src/app/core/routing/redirect.service.ts b/client/src/app/core/routing/redirect.service.ts index 17d9d1358..571476d1d 100644 --- a/client/src/app/core/routing/redirect.service.ts +++ b/client/src/app/core/routing/redirect.service.ts | |||
@@ -46,7 +46,7 @@ export class RedirectService { | |||
46 | return this.defaultTrendingAlgorithm | 46 | return this.defaultTrendingAlgorithm |
47 | } | 47 | } |
48 | 48 | ||
49 | redirectToPreviousRoute () { | 49 | redirectToPreviousRoute (fallbackRoute: string[] = null) { |
50 | const exceptions = [ | 50 | const exceptions = [ |
51 | '/verify-account', | 51 | '/verify-account', |
52 | '/reset-password' | 52 | '/reset-password' |
@@ -57,6 +57,10 @@ export class RedirectService { | |||
57 | if (!isException) return this.router.navigateByUrl(this.previousUrl) | 57 | if (!isException) return this.router.navigateByUrl(this.previousUrl) |
58 | } | 58 | } |
59 | 59 | ||
60 | if (fallbackRoute) { | ||
61 | return this.router.navigate(fallbackRoute) | ||
62 | } | ||
63 | |||
60 | return this.redirectToHomepage() | 64 | return this.redirectToHomepage() |
61 | } | 65 | } |
62 | 66 | ||