Skip to content
Myr

make application routing callback behave the same as middleware, fix logic and add test code

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Sean Soong · committed by TJ Holowaychuk · parent 2abcbed · Browse files · 2 files+40 added−2 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

2 files+40 added−2 removed

  • tests:+37 added−0 removed
  • other:+3 added−2 removed

2 files+40 added−2 removed

modified:lib/router/index.js+3 added-2 removed
156 unmodified lines
157 nextRoute();158 } else if (err && fn) {159 if (fn.length < 4) return callbacks(err);160 fn(err, req, res, callbacks);161 } else if (fn && fn.length < 4) {162 fn(req, res, callbacks);161 } else if (fn) {162 if (fn.length < 4) return fn(req, res, callbacks);163 callbacks();164 } else {165 nextRoute(err);166 }167 } catch (err) {
91 unmodified lines
added:test/app.routingCallback.js+37 added