Commit 0f8fe8e2 authored by Dominic Tarr's avatar Dominic Tarr

[style] tidy

parent 20125889
...@@ -203,13 +203,12 @@ exports.createServer = function () { ...@@ -203,13 +203,12 @@ exports.createServer = function () {
} }
} }
if (middleware.length /*> 1*/) { if (middleware.length > 1) {
//handler = callback = middleware.shift()
//else if (middleware.length)
handler = callback = stack(middleware, proxy); handler = callback = stack(middleware, proxy);
} }
else if (middleware.length) { //do not use middleware code if it's not needed. else if (middleware.length) {
var h = middleware[0] //do not use middleware code if it's not needed.
var h = middleware[0];
handler = callback = function (req,res) { h(req,res,proxy) }; handler = callback = function (req,res) { h(req,res,proxy) };
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment