Open
Description
Describe the bug
In query.svelte.ts we're comparing the number of query parameters has the same length as inbound
which is a Query object with 2 params, rather than inbound.params
which is what we loop over to check for query string matches. When there are not 2 querystring params, the test will fail even if all the params match their tests.
To Reproduce
Steps to reproduce the behavior:
- Add a third parameter to e.g. this route in the demo
- Navigate to the route in the demo site
- The route is not found since, though all params match, Object.keys(matches).length is 3 but
inbound
keys length are still 2
Expected behavior
A route with 1 or >2 parameters should match
While testing, I also added a parameter to a single param route (to make it have two parameters) e.g. empty
and set the value to 0. It seems that 0 fails to convert as a number correctly presumably because it's falsy
edit: opened PR here #67