-
Notifications
You must be signed in to change notification settings - Fork 406
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
middleware without path doesn't work #161
Comments
This is a simple bug in the source code. Here is the patch. if (matched.route) {
this.route = matched.route;
this.captures = this.route.captures(path, this.captures);
this.params = this.route.params(path, this.captures, this.params);
debug('dispatch %s %s', this.route.path, this.route.regexp);
next = matched.route.middleware.call(this, next);
}
if (matched.middleware) {
for (var i = 0, l = matched.middleware.length; i < l; i++) {
next = matched.middleware[i].call(this, next);
}
} |
@letchik your code is working in the master branch. You may be doing something wrong in your setup. |
ruiquelhas
pushed a commit
to seegno-forks/koa-router
that referenced
this issue
Oct 16, 2015
- Fixes ZijianHe#161, fixes ZijianHe#155, fixes ZijianHe#156. - Removes dependency on koa-compose.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I have a simple code
it doesn't work in this case, middlware didn't call
the other way works fine
The text was updated successfully, but these errors were encountered: