Regex capture groups not reflected in context parameters
mclotworthy opened this issue · comments
mclotworthy commented
Considering the route: /^\/inbox(?:\/?(actionable|other))?$/
A match will be made for URI: http://SomeMailServer/inbox
With expected context.params: { 0: undefined }
Currently pagejs returns an unexpected context.params of: { 0: "/inbox" }
mclotworthy commented
In Route.prototype.match
the loop starts from index 1 with the expectation that there will always be defined value for the first capture group. Suggest delete params[0]
before beginning the loop that populates params.