I was just browsing through the code and came across this:
result.catch(cb).then(function (result) {
process.nextTick(function () { cb(null, result) })
}
So, if result rejects, we'll .catch(cb) and call the callback, but then .then(function(result) {... will be called with whatever cb returns, so we'll call cb again next tick. This should be:
result.then(
function (result) {
process.nextTick(function () { cb(null, result) })
},
cb
);
(Edit to add link to code)