-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Warning of invalid param for catch all route with named route redirect #1617
Comments
This is due to the implicit parameter being passed during a redirection. You can workaround it by passing an empty object of Params alongside the name of the route: I’m unsure if this warning can be avoided without removing it. Worst case scenario we can also mention the workaround in the warning |
This works, thank you. I have no strong opinion on this, I understand why the warning is there since I'm redirecting to a route that has no parameters so the workaround makes sense to me. |
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
@posva I would like to work on this |
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
Is this issue sorted? If not i'd like to work on this as my first issue. |
Version
4.1.6
Reproduction link
jsfiddle.net/z0kytrqj/16/
Steps to reproduce
Navigate to a catch all route with a named route redirect
What is expected?
No warnings
What is actually happening?
Warning displayed: Discarded invalid param(s) "pathMatch" when navigating. See https://github.com/vuejs/router/blob/main/packages/router/CHANGELOG.md#414-2022-08-22 for more details.
The text was updated successfully, but these errors were encountered: