Skip to content

Commit c9dc717

Browse files
PassTheMayodaprahamian
authored andcommitted
fix(MongoClient): only check own properties for valid options
1 parent 23f1ac9 commit c9dc717

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
@@ -596,7 +596,7 @@ function validOptions(options) {
596596
const _validOptions = validOptionNames.concat(legacyOptionNames);
597597

598598
for (const name in options) {
599-
if (ignoreOptionNames.indexOf(name) !== -1) {
599+
if (ignoreOptionNames.indexOf(name) !== -1 || !options.hasOwnProperty(name)) {
600600
continue;
601601
}
602602

0 commit comments

Comments
 (0)