Skip to content

fix: expect 0 to be defined #2506

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

Merged
merged 1 commit into from
Dec 22, 2018
Merged

fix: expect 0 to be defined #2506

merged 1 commit into from
Dec 22, 2018

Conversation

clarkdo
Copy link
Contributor

@clarkdo clarkdo commented Nov 27, 2018

Try to fix #2505, delegate params['pathMatch'] to params['0'] for pathToRegexp package matching.

@rchl
Copy link
Contributor

rchl commented Dec 5, 2018

This fix feels hacky but I think for all practical purposes, it should be fine.

Maybe I would create a copy of params instead of mutating it to eliminate need to remove property and make it a bit cleaner.

Also, I would add tests to test the bug and the fix - here is my modified create-matcher.spec.js with relevant tests added - https://gist.github.com/rchl/2418f5c40e66f9f27a34f89f83960b9a

Please prioritize this @posva as it's a breaking bug in specific setup (with nuxt-i18n) and in development ENV, it breaks nuxt-link/router-link (in production just cases warning in the client).

@posva
Copy link
Member

posva commented Dec 5, 2018

I will come to it when I can :/
But it's supposed to just be a warning that shouldn't be displayed. Why would it break. And yes, a tes is required

@rchl
Copy link
Contributor

rchl commented Dec 5, 2018

Sorry, this is just a warning. I've confused this bug with nuxt-modules/i18n#73

@posva
Copy link
Member

posva commented Dec 22, 2018

I'll merge this and add the test and comments locally, thanks!

@posva posva merged commit bbfb889 into vuejs:dev Dec 22, 2018
@posva
Copy link
Member

posva commented Dec 22, 2018

hmm, doesn't seem to be fixed yet. I need to debug further. It's now on a branch fix/2505 in case you want to take a look. I won't be able to until tomorrow

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Catch all route with prefix throw Expected "0" to be defined
3 participants