-
Notifications
You must be signed in to change notification settings - Fork 249
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
Routing is too greedy #128
Comments
This issue made me rethink how Navigo handles routes. The route matching is based on regular expressions and one of them was not quite ok. That's now fixed as part of this latest release. However, these updates change how Navigo uses the registered routes so it may be a breaking change. I bumped the major version. So @jpeltoniemi can you please try with the latest 5.0.0. |
Sorry, I was in a hurry and couldn't wait, so I improvised my own router and as it seems to do its job pretty well, I can't really afford to spend time on Navigo anymore :/ |
Fair enough 👍 |
Consider route
/:moduleName/
I'd expect it to match only one-part urls like
/users/
or/things/
but instead it matches every url with at least one level.So, with that route this url
/rock/paper/scissors/
gives me{moduleName: 'scissors'}
while the expected result is to not match at all.As
/:moduleName/:pageName
with the url/rock/paper/scissors
gets parsed to{moduleName: 'paper', pageName: 'scissors'}
, I'd say it doesn't care where the route matches the url.The text was updated successfully, but these errors were encountered: