Skip to content

Commit

Permalink
fix(MongoClient): only check own properties for valid options
Browse files Browse the repository at this point in the history
  • Loading branch information
PassTheMayo authored and daprahamian committed Aug 13, 2019
1 parent 23f1ac9 commit c9dc717
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/operations/mongo_client_ops.js
Expand Up @@ -596,7 +596,7 @@ function validOptions(options) {
const _validOptions = validOptionNames.concat(legacyOptionNames);

for (const name in options) {
if (ignoreOptionNames.indexOf(name) !== -1) {
if (ignoreOptionNames.indexOf(name) !== -1 || !options.hasOwnProperty(name)) {
continue;
}

Expand Down

0 comments on commit c9dc717

Please sign in to comment.