Skip to content

Commit

Permalink
refactor: remove need for aggregate() import
Browse files Browse the repository at this point in the history
  • Loading branch information
vkarpov15 committed Jan 2, 2025
1 parent 4c6e324 commit 2ebcc9e
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions lib/drivers/node-mongodb-native/connection.js
Original file line number Diff line number Diff line change
Expand Up @@ -142,9 +142,7 @@ NativeConnection.prototype.useDb = function(name, options) {
*/

NativeConnection.prototype.aggregate = function aggregate(pipeline, options) {
Aggregate = Aggregate || require('../../aggregate');

return new Aggregate(null, this).append(pipeline).option(options ?? {});
return new this.base.Aggregate(null, this).append(pipeline).option(options ?? {});
};

/**
Expand Down

0 comments on commit 2ebcc9e

Please sign in to comment.