]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - client/src/app/core/routing/redirect.service.ts
Merge branch 'master' into develop
[github/Chocobozzz/PeerTube.git] / client / src / app / core / routing / redirect.service.ts
index 844f184b414ac6cb3baad62fcfa13c2b20d7450a..1881be117e4a9d20bc4a9e87ee25241474a26468 100644 (file)
@@ -28,10 +28,10 @@ export class RedirectService {
         })
   }
 
-  redirectToHomepage () {
+  redirectToHomepage (skipLocationChange = false) {
     console.log('Redirecting to %s...', RedirectService.DEFAULT_ROUTE)
 
-    this.router.navigate([ RedirectService.DEFAULT_ROUTE ], { replaceUrl: true })
+    this.router.navigate([ RedirectService.DEFAULT_ROUTE ], { skipLocationChange })
         .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 ], { replaceUrl: true })
+          return this.router.navigate([ RedirectService.DEFAULT_ROUTE ], { skipLocationChange })
         })
 
   }