]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - client/src/app/core/routing/redirect.service.ts
Add setting helper to client plugins
[github/Chocobozzz/PeerTube.git] / client / src / app / core / routing / redirect.service.ts
index e1db4097b87ff35934529538a2c86487ae22e9a8..571822b767a3dd85b8ec749fb19853dc29f0a517 100644 (file)
@@ -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()
   }