visionmedia / page.js

Micro client-side router inspired by the Express router
http://visionmedia.github.com/page.js
7.67k stars 687 forks source link

Remove Regex "matched text" #539

Closed mclotworthy closed 5 years ago

mclotworthy commented 5 years ago

In the case that all capture groups from a regex are optional and not supplied in the checked text; context.params[0] will be the "matched text" of the regex. Deleting property 0 from params before populating params prevents this.

https://github.com/visionmedia/page.js/issues/538

coveralls commented 5 years ago

Coverage Status

Coverage increased (+0.4%) to 92.531% when pulling f2ce7424c7a76ce4c03afa00793ad6cdd15bea2b on mclotworthy:master into aee9de80a891f42b78c8605f139438e726d21f60 on visionmedia:master.

matthewp commented 5 years ago

Thanks! Think you could add a test?

matthewp commented 5 years ago

Perfect, thank you!