Skip to content

Commit

Permalink
fixed Mongodb DeprecationWarning: { useUnifiedTopology: true } (#55)
Browse files Browse the repository at this point in the history
added "defaultOpt.useUnifiedTopology = true;" to remove "DeprecationWarning: pass option { useUnifiedTopology: true } to the MongoClient constructor"
  • Loading branch information
rohantarai authored and adrai committed Nov 9, 2019
1 parent efa05a2 commit 58b39fa
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions lib/databases/mongodb.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ var MongoSessionStore = function (options) {
if (isNew) {
defaultOpt.autoReconnect = false;
defaultOpt.useNewUrlParser = true;
defaultOpt.useUnifiedTopology = true;
_.defaults(options.options, defaultOpt);
} else {
defaultOpt.auto_reconnect = false;
Expand Down

0 comments on commit 58b39fa

Please sign in to comment.