|
@@ -185,7 +185,8 @@ var Pipeline = module.exports = (function(){
|
|
|
if(inputSource && !(inputSource instanceof DocumentSource)) throw new Error("arg `inputSource` must be an instance of DocumentSource");
|
|
|
if(!callback) throw new Error("arg `callback` required");
|
|
|
var self = this;
|
|
|
- inputSource.setSource(undefined, function(){ //TODO: HACK: temp solution to the fact that we need to initialize our source since we're using setSource as a workaround for the lack of real async cursors
|
|
|
+ inputSource.setSource(undefined, function(err){ //TODO: HACK: temp solution to the fact that we need to initialize our source since we're using setSource as a workaround for the lack of real async cursors
|
|
|
+ if(err) return callback(err);
|
|
|
// chain together the sources we found
|
|
|
async.eachSeries(self.sourceVector,
|
|
|
function eachSrc(item, next){
|