X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=client%2Fsrc%2Fapp%2Fcore%2Frouting%2Fredirect.service.ts;h=571822b767a3dd85b8ec749fb19853dc29f0a517;hb=23bdacf8ec24ce47a15529830e116911d7478598;hp=e1db4097b87ff35934529538a2c86487ae22e9a8;hpb=88108880bbdba473cfe36ecbebc1c3c4f972e102;p=github%2FChocobozzz%2FPeerTube.git diff --git a/client/src/app/core/routing/redirect.service.ts b/client/src/app/core/routing/redirect.service.ts index e1db4097b..571822b76 100644 --- a/client/src/app/core/routing/redirect.service.ts +++ b/client/src/app/core/routing/redirect.service.ts @@ -42,7 +42,14 @@ export class RedirectService { } redirectToPreviousRoute () { - if (this.previousUrl) return this.router.navigateByUrl(this.previousUrl) + const exceptions = [ + '/verify-account' + ] + + if (this.previousUrl) { + const isException = exceptions.find(e => this.previousUrl.startsWith(e)) + if (!isException) return this.router.navigateByUrl(this.previousUrl) + } return this.redirectToHomepage() }