iron-meteor/iron-url

Url.resolve doesn't support wildcard character in parameter values

Opened this issue · 0 comments

I don't use wildcard in routes; simply define a route

Router.route("/user/:id?", {
    name: "userInfo",
    template: "...",
    layoutTemplate: "...",
});

and use

Router.routes.userInfo.path({
    id: Meteor.user().username
});

Then if I have the user name a*a, Router.routes.userInfo.path throws an exception You are trying to access a wild card parameter at index 0 but but the value of params at that index is undefined

Stack trace:

  1. route.js/path
  2. handler.js/resolve
  3. url.js/resole

Any wildcard in a params will result in this.