Skip to content

Commit

Permalink
[style] tidy
Browse files Browse the repository at this point in the history
  • Loading branch information
dominictarr committed Aug 2, 2011
1 parent 2012588 commit 0f8fe8e
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions lib/node-http-proxy.js
Original file line number Diff line number Diff line change
Expand Up @@ -203,13 +203,12 @@ exports.createServer = function () {
}
}

if (middleware.length /*> 1*/) {
//handler = callback = middleware.shift()
//else if (middleware.length)
if (middleware.length > 1) {
handler = callback = stack(middleware, proxy);
}
else if (middleware.length) { //do not use middleware code if it's not needed.
var h = middleware[0]
else if (middleware.length) {
//do not use middleware code if it's not needed.
var h = middleware[0];
handler = callback = function (req,res) { h(req,res,proxy) };
}

Expand Down

0 comments on commit 0f8fe8e

Please sign in to comment.