Skip to content

Commit 2be24f4

Browse files
committed
fix: support callback with createConnection() and useMongoClient
Re: #6217
1 parent cfad53b commit 2be24f4

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -188,14 +188,14 @@ var checkReplicaSetInUri = function(uri) {
188188
* @api public
189189
*/
190190

191-
Mongoose.prototype.createConnection = function(uri, options) {
191+
Mongoose.prototype.createConnection = function(uri, options, callback) {
192192
var conn = new Connection(this);
193193
this.connections.push(conn);
194194

195195
var rsOption = options && (options.replset || options.replSet);
196196

197197
if (options && options.useMongoClient) {
198-
return conn.openUri(uri, options);
198+
return conn.openUri(uri, options, callback);
199199
}
200200

201201
if (arguments.length) {

0 commit comments

Comments
 (0)