Skip to content

Commit

Permalink
Merge pull request #198 from WoLpH/patch-1
Browse files Browse the repository at this point in the history
Fixed #182: "The 'cursor' option is required"
  • Loading branch information
TylerBrock committed Oct 28, 2018
2 parents f15ce3f + 5fdf310 commit efa16b9
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions hacks/aggregation.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@ DBCollection.prototype.aggregate = function( ops, extraOpts ){
extraOpts = {};
}

if (extraOpts.cursor === undefined){
extraOpts.cursor = {batchSize: 1000};
}

var cmd = {pipeline: arr};
Object.extend(cmd, extraOpts);

Expand Down

0 comments on commit efa16b9

Please sign in to comment.