Skip to content

Commit d6c3417

Browse files
ORESoftwarembroadst
authored andcommitted
fix(mongo-client): pass arguments to ctor when new keyword is used
1 parent d6258bb commit d6c3417

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/mongo_client.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -259,7 +259,7 @@ function validOptions(options) {
259259
* @return {MongoClient} a MongoClient instance
260260
*/
261261
function MongoClient(url, options) {
262-
if (!(this instanceof MongoClient)) return new MongoClient();
262+
if (!(this instanceof MongoClient)) return new MongoClient(url, options);
263263

264264
// Set up event emitter
265265
EventEmitter.call(this);

0 commit comments

Comments
 (0)