kadirahq / flow-router

Carefully Designed Client Side Router for Meteor
MIT License
1.09k stars 195 forks source link

FlowRouter.path : Route name instead of the pathDef when pipe RegexExp #570

Open btoueg opened 8 years ago

btoueg commented 8 years ago

Reversing a url by route name when url param is a piped regex does not work as expected.

FlowRouter.route('/:status(VA|CO)', {name: 'test'})
>Route {options: Object, pathDef: "/:status(VA|CO)", path: "/:status(VA|CO)", name: "test", _triggersEnter: Array[0]…}
FlowRouter.path('test', {status: 'CO'})
>"/CO|CO)"