veliovgroup / flow-router

🚦 Carefully extended flow-router for Meteor
https://packosphere.com/ostrio/flow-router-extra
BSD 3-Clause "New" or "Revised" License
201 stars 30 forks source link

Update Router.go signature to accept null for params #106

Closed harveysanders closed 5 months ago

harveysanders commented 6 months ago

Resolves #104

This PR updates the signatures to Router.go, Router.path, and Router.url to allow passing null as the params argument. This makes code more clear when you want to call Router.go without any parameters, yet need to pass the qs argument.

Router.go('someRoute', null, { q: 'a+query' });

Previously you would need to pass undefined as the second argument.

Router.go('someRoute', undefined, { q: 'a+query' });
dr-dimitru commented 5 months ago

Superseded by #108