Skip to content

Commit 9cde4b9

Browse files
PassTheMayodaprahamian
authored andcommitted
fix(MongoClient): only check own properties for valid options
1 parent f60e639 commit 9cde4b9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/operations/mongo_client_ops.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -590,7 +590,7 @@ function validOptions(options) {
590590
const _validOptions = validOptionNames.concat(legacyOptionNames);
591591

592592
for (const name in options) {
593-
if (ignoreOptionNames.indexOf(name) !== -1) {
593+
if (ignoreOptionNames.indexOf(name) !== -1 || !options.hasOwnProperty(name)) {
594594
continue;
595595
}
596596

0 commit comments

Comments
 (0)