Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
welelay opened this issue Apr 10, 2015 · 0 comments
Open

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

welelay opened this issue Apr 10, 2015 · 0 comments

Comments

@welelay
Copy link

welelay commented Apr 10, 2015

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.

welelay added a commit to welelay/iron-url that referenced this issue Apr 10, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant