Skip to content

Commit bd0fd92

Browse files
committed
Merge pull request #2490 from kjvalencik/patch-1
Fix recursive `readPref`
2 parents 117fefd + 2bc8640 commit bd0fd92

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

lib/utils.js

+4
Original file line numberDiff line numberDiff line change
@@ -472,6 +472,10 @@ exports.readPref = function readPref (pref, tags) {
472472
pref = pref[0];
473473
}
474474

475+
if (pref instanceof ReadPref) {
476+
return pref;
477+
}
478+
475479
switch (pref) {
476480
case 'p':
477481
pref = 'primary';

0 commit comments

Comments
 (0)