Skip to content
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

asterisk without root slash fails to match routes #3074

Closed
wlnirvana opened this issue Dec 22, 2019 · 2 comments
Closed

asterisk without root slash fails to match routes #3074

wlnirvana opened this issue Dec 22, 2019 · 2 comments

Comments

@wlnirvana
Copy link

@wlnirvana wlnirvana commented Dec 22, 2019

Version

3.1.3

Reproduction link

https://jsfiddle.net/c7hvumdn/

Steps to reproduce

Clicking any of the three links ( Go to Bar, Go to /B/a/z, Go to /b/a/b/c/d/e/f), the Foo component does not show up, which means the catch-all route fails.

What is expected?

all routes should be catched by the wildcard match and only Foo be displayed

What is actually happening?

Foo, Bar, Baz all can show up.

@posva

This comment has been minimized.

Copy link
Member

@posva posva commented Dec 22, 2019

The asterisk route has a special treatment and is put at the end precisely to prevent this mistake of including it before other routes and ending up catching too much

@posva posva closed this Dec 22, 2019
@wlnirvana

This comment has been minimized.

Copy link
Author

@wlnirvana wlnirvana commented Dec 23, 2019

@wlnirvana So a single * route has to be in the end to take effect, but "mixed wildcard" like /user-* does not necessarily come in the end. Right?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.