And I try to match it against a URI without the ? symbol:
/user/1,2,3/posts
It explodes and I just get an empty object {}. But when I add the ? symbol to the end of the URI, it works (matches type, ids, field). The caveat to appending the ? is that now I get {'': ''} in the query object that is extraneous so I delete it.
In substitution, if I pass in nothing as query, this works, but somehow it's not optional in de-substitution.
When I have a template that looks like this:
And I try to match it against a URI without the
?
symbol:It explodes and I just get an empty object
{}
. But when I add the?
symbol to the end of the URI, it works (matches type, ids, field). The caveat to appending the?
is that now I get{'': ''}
in thequery
object that is extraneous so I delete it.In substitution, if I pass in nothing as
query
, this works, but somehow it's not optional in de-substitution.