Skip to content

Commit 9c9796d

Browse files
Pass promise library through to DB function
If the library is not properly passed, the underlying function attempts to use es-6 promises instead. As I am not using that particular package, it crashes my app.
1 parent 0c628e9 commit 9c9796d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/mongo_client.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -242,7 +242,7 @@ var connect = function(url, options, callback) {
242242

243243
var connectFunction = function(__server) {
244244
// Attempt connect
245-
new Db(object.dbName, __server, {w:1, native_parser:false}).open(function(err, db) {
245+
new Db(object.dbName, __server, {w:1, native_parser:false, promiseLibrary:options.promiseLibrary}).open(function(err, db) {
246246
// Update number of servers
247247
totalNumberOfServers = totalNumberOfServers - 1;
248248

0 commit comments

Comments
 (0)