Skip to content

Commit 31fc44d

Browse files
committed
NODE-767 add doc for applySkipLimit as being defaulting to true
1 parent 64992e1 commit 31fc44d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/cursor.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -893,7 +893,7 @@ define.classMethod('toArray', {callback: true, promise:true});
893893
/**
894894
* Get the count of documents for this cursor
895895
* @method
896-
* @param {boolean} applySkipLimit Should the count command apply limit and skip settings on the cursor or in the passed in options.
896+
* @param {boolean} [applySkipLimit=true] Should the count command apply limit and skip settings on the cursor or in the passed in options.
897897
* @param {object} [options=null] Optional settings.
898898
* @param {number} [options.skip=null] The number of documents to skip.
899899
* @param {number} [options.limit=null] The maximum amounts to count before aborting.
@@ -924,7 +924,7 @@ Cursor.prototype.count = function(applySkipLimit, opts, callback) {
924924
var count = function(self, applySkipLimit, opts, callback) {
925925
if(typeof applySkipLimit == 'function') {
926926
callback = applySkipLimit;
927-
applySkipLimit = true;
927+
applySkipLimit = false;
928928
}
929929

930930
if(applySkipLimit) {

0 commit comments

Comments
 (0)