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 f5130fe commit de598e8Copy full SHA for de598e8
src/mongo_client.ts
@@ -438,7 +438,7 @@ export class MongoClient extends TypedEventEmitter<MongoClientEvents> {
438
options.ca ??= await fs.readFile(options.tlsCAFile, { encoding: 'utf8' });
439
}
440
if (typeof options.tlsCertificateKeyFile === 'string') {
441
- if (!options.key || !options.cert) {
+ if (typeof options.key !== 'string' || typeof options.cert !== 'string') {
442
const contents = await fs.readFile(options.tlsCertificateKeyFile, { encoding: 'utf8' });
443
options.key ??= contents;
444
options.cert ??= contents;
0 commit comments