kadirahq / flow-router

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

FlowRouter.go(name, Params) misses to put in params with value 0 in path #627

Open DarkKnighth opened 8 years ago

DarkKnighth commented 8 years ago

Running this code:

FlowRouter.go('pagename', { Id: _id, offset: 0 });

with this route:

FlowRouter.route('/pagename/:Id/:offset', { name: 'pagename', });

I expected the route to end up like:

/pagename/1/0

but I got:

/pagename/1

Worth noting is that I have parsed offset into a number. I'm guessing that there is a check on if (!offset) somewhere in your code and that you haven't thought of if that variable actually is a number with value of zero.