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
{{ message }}
This repository was archived by the owner on Dec 12, 2018. It is now read-only.
However, printing out the next function reveals that it only accepts one argument, see below
function (v) {
if (cb && check(v)) {
cb(getResult(true, x));
cb = iterator = false;
}
callback();
}
Practically, it appears that the signature should be next(test) to get the described behavior.
For instance I was calling next(null, test) as I had no errors and that resulted in all resources being visited and null being passed as the foundResource argument of doneCallback
The docs indicate that the iterator in collectionResource.detect must call it's
nextargument with the signaturenext(err, test).https://docs.stormpath.com/nodejs/jsdoc/CollectionResource.html#detect__anchor
However, printing out the
nextfunction reveals that it only accepts one argument, see belowPractically, it appears that the signature should be
next(test)to get the described behavior.For instance I was calling
next(null, test)as I had no errors and that resulted in all resources being visited andnullbeing passed as thefoundResourceargument ofdoneCallback