Comparing version 1.0.14 to 1.0.15
@@ -141,8 +141,7 @@ "use strict"; | ||
process.nextTick(() => { | ||
let arity = 3, | ||
iter = middleware.next(); | ||
let iter = middleware.next(), | ||
arity = !iter.done ? utility.getArity(iter.value) : 0; | ||
if (!res.finished && !iter.done) { | ||
if (err) { | ||
arity = utility.getArity(iter.value); | ||
do { | ||
@@ -154,13 +153,9 @@ arity = utility.getArity(iter.value); | ||
if (!iter.done) { | ||
if (err) { | ||
if (arity === 4) { | ||
try { | ||
iter.value(err, req, res, next); | ||
} catch (e) { | ||
next(e); | ||
} | ||
} else { | ||
last(err); | ||
if (err && arity === 4) { | ||
try { | ||
iter.value(err, req, res, next); | ||
} catch (e) { | ||
next(e); | ||
} | ||
} else { | ||
} else if (!err && arity === 2 || arity === 3) { | ||
try { | ||
@@ -171,5 +166,5 @@ iter.value(req, res, next); | ||
} | ||
} else { | ||
last(err); | ||
} | ||
} else { | ||
last(err); | ||
} | ||
@@ -176,0 +171,0 @@ } else if (!res.finished) { |
{ | ||
"name": "woodland", | ||
"version": "1.0.14", | ||
"version": "1.0.15", | ||
"description": "Lightweight HTTP/HTTPS router with virtual hosts", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
15226
352