remove unnecessary closure

This commit is contained in:
Jonathan Ong 2013-11-08 01:04:26 -08:00
parent b35929dc3a
commit 1bcf9b413f

View file

@ -91,9 +91,7 @@ app.callback = function(){
return function(req, res){ return function(req, res){
var ctx = new Context(self, req, res); var ctx = new Context(self, req, res);
co.call(ctx, gen)(function(err){ co.call(ctx, gen)(ctx.onerror);
if (err) ctx.onerror(err);
});
} }
}; };