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 Jun 20, 2019
1 parent f60e639 commit 9cde4b9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/operations/mongo_client_ops.js
Expand Up @@ -590,7 +590,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 9cde4b9

Please sign in to comment.