Fix history back after a redirect

pull/586/head
Chocobozzz 2018-05-24 09:44:04 +02:00
parent 1fad099d72
commit 108a66f0da
No known key found for this signature in database
GPG Key ID: 583A612D890159BE
1 changed files with 2 additions and 2 deletions

View File

@ -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 })
})
}