Skip to content

Commit

Permalink
[fix] short circuit
Browse files Browse the repository at this point in the history
  • Loading branch information
yawnt committed Sep 3, 2013
1 parent b85aa16 commit a6256ca
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions lib/caronte/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,14 @@ function createRightProxy(type) {
ev = 'caronte:' + type + ':';
//self.emit(ev + 'begin', req, res);

passes.forEach(function(pass) {

passes.every(function(pass) {
var evnt = ev + pass.name.toLowerCase();

//self.emit(evnt + 'begin', req, res);
pass(req, res, options, self);
var val = pass(req, res, options, self);
//self.emit(evnt + 'end');
return val;
});

//self.emit(ev + 'end');
Expand Down

0 comments on commit a6256ca

Please sign in to comment.