Permalink
Browse files

Fix: return all original return values. (Issue #1)

  • Loading branch information...
aseemk committed Jun 25, 2012
1 parent 00039db commit cfe3b4881f2b7620b5dfe3e5bd0c9e689626d073
Showing with 3 additions and 3 deletions.
  1. +3 −3 index.js
View
@@ -13,11 +13,11 @@ function wrap(handler) {
if (handler.length >= 4) {
return function (err, req, res, next) {
- handler(err, req, res, callback(next));
+ return handler(err, req, res, callback(next));
}
} else {
return function (req, res, next) {
- handler(req, res, callback(next));
+ return handler(req, res, callback(next));
}
}
}
@@ -39,7 +39,7 @@ function patch(verb) {
}
// finally, call the original method now with the updated args:
- origAppVerb.apply(this, arguments);
+ return origAppVerb.apply(this, arguments);
};
}

0 comments on commit cfe3b48

Please sign in to comment.