Skip to content

Commit

Permalink
fix(mongo-client): pass arguments to ctor when new keyword is used
Browse files Browse the repository at this point in the history
  • Loading branch information
ORESoftware authored and mbroadst committed May 1, 2018
1 parent d6258bb commit d6c3417
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/mongo_client.js
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,7 @@ function validOptions(options) {
* @return {MongoClient} a MongoClient instance
*/
function MongoClient(url, options) {
if (!(this instanceof MongoClient)) return new MongoClient();
if (!(this instanceof MongoClient)) return new MongoClient(url, options);

// Set up event emitter
EventEmitter.call(this);
Expand Down

0 comments on commit d6c3417

Please sign in to comment.