]> git.ipfire.org Git - thirdparty/vuejs/router.git/commitdiff
feat(warn): infinite redirection up to 30
authorEduardo San Martin Morote <posva13@gmail.com>
Tue, 27 Dec 2022 13:07:05 +0000 (14:07 +0100)
committerEduardo San Martin Morote <posva13@gmail.com>
Tue, 27 Dec 2022 13:07:11 +0000 (14:07 +0100)
Close #1643

packages/router/src/router.ts

index f7edf8cb74f4555632d8f21b663450af8ea81fe7..e2d5bfab2c216407c4de4944bbf23dab41d6d544 100644 (file)
@@ -716,10 +716,10 @@ export function createRouter(options: RouterOptions): Router {
               (redirectedFrom._count = redirectedFrom._count
                 ? // @ts-expect-error
                   redirectedFrom._count + 1
-                : 1) > 10
+                : 1) > 30
             ) {
               warn(
-                `Detected an infinite redirection in a navigation guard when going from "${from.fullPath}" to "${toLocation.fullPath}". Aborting to avoid a Stack Overflow. This will break in production if not fixed.`
+                `Detected a possibly infinite redirection in a navigation guard when going from "${from.fullPath}" to "${toLocation.fullPath}". Aborting to avoid a Stack Overflow. This might break in production if not fixed.`
               )
               return Promise.reject(
                 new Error('Infinite redirect in navigation guard')