We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent aa5e705 commit 4a0cfebCopy full SHA for 4a0cfeb
lib/db.js
@@ -687,6 +687,8 @@ Db.prototype.listCollections = function(filter, options) {
687
// Ensure valid readPreference
688
if (options.readPreference) {
689
options.readPreference = convertReadPreference(options.readPreference);
690
+ } else {
691
+ options.readPreference = this.s.readPreference || ReadPreference.primary;
692
}
693
694
// We have a list collections command
0 commit comments