We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 904dbfd commit 39bf692Copy full SHA for 39bf692
lib/operations/mongo_client_ops.js
@@ -593,10 +593,12 @@ function validOptions(options) {
593
continue;
594
}
595
596
- if (_validOptions.indexOf(name) === -1 && options.validateOptions) {
597
- return new MongoError(`option ${name} is not supported`);
598
- } else if (_validOptions.indexOf(name) === -1) {
599
- console.warn(`the options [${name}] is not supported`);
+ if (_validOptions.indexOf(name) === -1) {
+ if (options.validateOptions) {
+ return new MongoError(`option ${name} is not supported`);
+ } else {
600
+ console.warn(`the options [${name}] is not supported`);
601
+ }
602
603
604
if (legacyOptionNames.indexOf(name) !== -1) {
0 commit comments