Skip to content

Commit 376edd3

Browse files
committed
feat(warn): infinite redirection up to 30
Close #1643
1 parent dbd0bc6 commit 376edd3

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

packages/router/src/router.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -716,10 +716,10 @@ export function createRouter(options: RouterOptions): Router {
716716
(redirectedFrom._count = redirectedFrom._count
717717
? // @ts-expect-error
718718
redirectedFrom._count + 1
719-
: 1) > 10
719+
: 1) > 30
720720
) {
721721
warn(
722-
`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.`
722+
`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.`
723723
)
724724
return Promise.reject(
725725
new Error('Infinite redirect in navigation guard')

0 commit comments

Comments
 (0)