Skip to content

Commit

Permalink
Merge pull request #11322 from JavanPoirier/doc-fix
Browse files Browse the repository at this point in the history
Add "new" to ObjectId class in aggregate.js docs
  • Loading branch information
vkarpov15 authored Feb 7, 2022
2 parents 624a014 + c782a12 commit 36c6863
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/aggregate.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ const readConcern = Query.prototype.readConcern;
* ```javascript
* new Aggregate([{ $match: { _id: '00000000000000000000000a' } }]);
* // Do this instead to cast to an ObjectId
* new Aggregate([{ $match: { _id: mongoose.Types.ObjectId('00000000000000000000000a') } }]);
* new Aggregate([{ $match: { _id: new mongoose.Types.ObjectId('00000000000000000000000a') } }]);
* ```
*
* @see MongoDB http://docs.mongodb.org/manual/applications/aggregation/
Expand Down

0 comments on commit 36c6863

Please sign in to comment.