New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weβll occasionally send you account related emails.
Already on GitHub? Sign in to your account
docs: add warning about redirect check #20680
docs: add warning about redirect check #20680
Conversation
Β Open in CodeSandbox Web Editor | VS Code | VS Code Insiders |
β Live Preview ready!
|
Oops, didn't know what re-requesting review button would do |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's keep the current to.path
rather than from.path
but we can add a comment along the lines of:
// in a real app you would probably not redirect every route to `/`
// but it is important to check `to.path` before redirecting or you
// may cause an infinite redirect loop
Sure thing! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
π Linked issue
Fixes #20678
β Type of change
π Description
This PR fixes multiple issues with the newly merged docs, such as to.path usage in route guards (in stead of from.path, because we don't want to force people onto a specific route, the goal is to avoid infinite redirects). Also, this fixes an undefined variable 'user' in the "err as a String" section of the api/utils/abort-navigation page.
π Checklist