Skip to content

Commit 0f8fe8e

Browse files
committed
[style] tidy
1 parent 2012588 commit 0f8fe8e

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

Diff for: lib/node-http-proxy.js

+4-5
Original file line numberDiff line numberDiff line change
@@ -203,13 +203,12 @@ exports.createServer = function () {
203203
}
204204
}
205205

206-
if (middleware.length /*> 1*/) {
207-
//handler = callback = middleware.shift()
208-
//else if (middleware.length)
206+
if (middleware.length > 1) {
209207
handler = callback = stack(middleware, proxy);
210208
}
211-
else if (middleware.length) { //do not use middleware code if it's not needed.
212-
var h = middleware[0]
209+
else if (middleware.length) {
210+
//do not use middleware code if it's not needed.
211+
var h = middleware[0];
213212
handler = callback = function (req,res) { h(req,res,proxy) };
214213
}
215214

0 commit comments

Comments
 (0)