diff --git a/lib/db.js b/lib/db.js index 9d2f2e52bd..15f7555777 100644 --- a/lib/db.js +++ b/lib/db.js @@ -687,6 +687,8 @@ Db.prototype.listCollections = function(filter, options) { // Ensure valid readPreference if (options.readPreference) { options.readPreference = convertReadPreference(options.readPreference); + } else { + options.readPreference = this.s.readPreference || ReadPreference.primary; } // We have a list collections command