Skip to content

Commit

Permalink
Merge e1b916f into e62a055
Browse files Browse the repository at this point in the history
  • Loading branch information
raymondfeng committed Jun 27, 2019
2 parents e62a055 + e1b916f commit 6b5cda8
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/mongodb.js
Original file line number Diff line number Diff line change
Expand Up @@ -311,6 +311,10 @@ MongoDB.prototype.connect = function(callback) {
self.client = client;
// The database name might be in the url
return urlParser(self.settings.url, self.settings, function(err, url) {
if (err) {
if (callback) callback(err);
return;
}
self.db = client.db(
url.dbName || self.settings.database,
url.db_options || self.settings
Expand Down

0 comments on commit 6b5cda8

Please sign in to comment.