From 7cf26f433f5d93fb5325495bc87bdef87260aada Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Fri, 8 Jun 2018 11:25:12 +0200 Subject: Fix e2e tests --- client/src/app/app.component.ts | 2 +- client/src/app/core/routing/redirect.service.ts | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'client/src/app') diff --git a/client/src/app/app.component.ts b/client/src/app/app.component.ts index 6087dbf80..0bfe9f916 100644 --- a/client/src/app/app.component.ts +++ b/client/src/app/app.component.ts @@ -55,7 +55,7 @@ export class AppComponent implements OnInit { if (e instanceof NavigationEnd) { const pathname = window.location.pathname if (!pathname || pathname === '/' || is18nPath(pathname)) { - this.redirectService.redirectToHomepage() + this.redirectService.redirectToHomepage(true) } } }) diff --git a/client/src/app/core/routing/redirect.service.ts b/client/src/app/core/routing/redirect.service.ts index b7803cce2..1881be117 100644 --- a/client/src/app/core/routing/redirect.service.ts +++ b/client/src/app/core/routing/redirect.service.ts @@ -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 ], { skipLocationChange: 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 ], { skipLocationChange: true }) + return this.router.navigate([ RedirectService.DEFAULT_ROUTE ], { skipLocationChange }) }) } -- cgit v1.2.3