-
-
Notifications
You must be signed in to change notification settings - Fork 5.1k
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
Catch all route with prefix throw Expected "0" to be defined
#2505
Catch all route with prefix throw Expected "0" to be defined
#2505
Comments
Update: @clarkdo fixed that in Nuxt via https://github.com/nuxt/nuxt.js/pull/4394/files#diff-90f8231837497e514ba4e8e477131204R437 Maybe we could apply the same fix (as the original part is still in the code as is https://github.com/nuxt/nuxt.js/pull/4394/files) or revert the change? |
I think it's better to modify the check done to display the warning 😆 |
@posva Well, Line 828 in cf9dc11
pathToRegexp package.
Related src file: Lines 1 to 27 in deba65a
|
I mean we should be able to do it in the warning check. I haven't checked it at runtime, but I'm talking about util/params.js |
This bug triggers when calling I wonder if the special case of 'unnamed' param might need a more tailored approach here. |
(BTW. This bug is a recent regression related to |
Version
3.0.2
Reproduction link
https://codesandbox.io/s/lykxn57kr7
Prefix routes are fine when they don't have a prefix but with a
/sth/
it becomes problematic.This causes problems especially for
nuxt-i18n
together with a catch-all-route (as it uses lang prefixes)Steps to reproduce
Info: This did not happen in 3.0.1
Related: #2496, #2503
What is expected?
No warning
What is actually happening?
Warning
The text was updated successfully, but these errors were encountered: