From: Chocobozzz Date: Thu, 24 May 2018 07:44:04 +0000 (+0200) Subject: Fix history back after a redirect X-Git-Tag: v1.0.0-beta.7~20 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=108a66f0dac7586f2f7871c6bb77f73cb924f2b3;p=oweals%2Fpeertube.git Fix history back after a redirect --- diff --git a/client/src/app/core/routing/redirect.service.ts b/client/src/app/core/routing/redirect.service.ts index a0125e0ae..abe044d73 100644 --- a/client/src/app/core/routing/redirect.service.ts +++ b/client/src/app/core/routing/redirect.service.ts @@ -31,7 +31,7 @@ export class RedirectService { redirectToHomepage () { console.log('Redirecting to %s...', RedirectService.DEFAULT_ROUTE) - this.router.navigate([ RedirectService.DEFAULT_ROUTE ]) + this.router.navigate([ RedirectService.DEFAULT_ROUTE ], { replaceUrl: true }) .catch(() => { console.error( 'Cannot navigate to %s, resetting default route to %s.', @@ -40,7 +40,7 @@ export class RedirectService { ) RedirectService.DEFAULT_ROUTE = RedirectService.INIT_DEFAULT_ROUTE - return this.router.navigate([ RedirectService.DEFAULT_ROUTE ]) + return this.router.navigate([ RedirectService.DEFAULT_ROUTE ], { replaceUrl: true }) }) }