You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm not sure that beforeRouter/afterRouter must be validated to be an array because concat works fine if passed argument can be added to existing array -> [1, 2].concat(3) => [1, 2, 3]
Another note is that, if we keep the current structure and declare beforeRouter/afterRouter as NOT an array, nextCallback can be set incorrectly (it will be true) but afterRouter won't be added
My proposal here is to allow developers to pass afterRouter as function of array of functions. In this case we do not need to validate beforeRouter/afterRouter for Array.isArray
The text was updated successfully, but these errors were encountered:
Hi @robtweed
Please consider the following lines:
qewd/lib/master-express.js
Lines 95 to 102 in cbf87ac
Some notes:
beforeRouter
/afterRouter
must be validated to be an array because concat works fine if passed argument can be added to existing array ->[1, 2].concat(3) => [1, 2, 3]
beforeRouter
/afterRouter
as NOT an array,nextCallback
can be set incorrectly (it will betrue
) butafterRouter
won't be addedMy proposal here is to allow developers to pass
afterRouter
as function of array of functions. In this case we do not need to validatebeforeRouter
/afterRouter
forArray.isArray
The text was updated successfully, but these errors were encountered: