Merge branch 'master' of github.com:koajs/koa

This commit is contained in:
TJ Holowaychuk 2013-11-08 14:38:42 -08:00
commit 9778933e25

View file

@ -88,10 +88,10 @@ app.callback = function(){
var gen = compose(mw);
var self = this;
return function(req, res){
return function(req, res, next){
var ctx = new Context(self, req, res);
co.call(ctx, gen)(ctx.onerror);
co.call(ctx, gen)(next || ctx.onerror);
}
};