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 2aa8ac1 commit 772c458Copy full SHA for 772c458
src/explain.ts
@@ -93,7 +93,7 @@ export class Explain {
93
94
export function validateExplainTimeoutOptions(options: Document, explain?: Explain) {
95
const { maxTimeMS, timeoutMS } = options;
96
- if ((maxTimeMS != null && timeoutMS) || (explain?.maxTimeMS != null && timeoutMS != null)) {
+ if (timeoutMS != null && (maxTimeMS != null || explain?.maxTimeMS != null)) {
97
throw new MongoAPIError('Cannot use maxTimeMS with timeoutMS for explain commands.');
98
}
99
0 commit comments