jugglingdb
jugglingdb copied to clipboard
callback of AbstractClass.include may be executed several times
/lib/include.js line 25: AbstractClass.include = function (objects, include, cb) {
If objects length is 0, and include is an array with multiple items, the cb will be executed several times.
While integrating with Express, this will cause the known issue "Can't set headers after they are sent."
To fix it, my suggestion is to add "return" before cb in line 53 as: return cb(null, objects);