Skip to content

Commit 6673171

Browse files
PR requested changes 2
1 parent 0b7551b commit 6673171

File tree

1 file changed

+13
-15
lines changed

1 file changed

+13
-15
lines changed

src/mongo_client.ts

Lines changed: 13 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -374,26 +374,24 @@ export class MongoClient extends TypedEventEmitter<MongoClientEvents> {
374374

375375
/** @internal */
376376
private checkForNonGenuineHosts() {
377-
if (this.mongoLogger && this.mongoLogger.logDestination) {
378-
const documentDBHostnames = this[kOptions].hosts.filter((hostAddress: HostAddress) =>
379-
isHostMatch(DOCUMENT_DB_CHECK, hostAddress.host)
380-
);
377+
const documentDBHostnames = this[kOptions].hosts.filter((hostAddress: HostAddress) =>
378+
isHostMatch(DOCUMENT_DB_CHECK, hostAddress.host)
379+
);
381380

382-
const srvHostIsDocumentDB = isHostMatch(DOCUMENT_DB_CHECK, this[kOptions].srvHost);
381+
const srvHostIsDocumentDB = isHostMatch(DOCUMENT_DB_CHECK, this[kOptions].srvHost);
383382

384-
if (documentDBHostnames.length !== 0 || srvHostIsDocumentDB) {
385-
this.mongoLogger.info('client', DOCUMENT_DB_MSG);
386-
}
383+
if (documentDBHostnames.length !== 0 || srvHostIsDocumentDB) {
384+
this.mongoLogger.info('client', DOCUMENT_DB_MSG);
385+
}
387386

388-
const cosmosDBHostnames = this[kOptions].hosts.filter((hostAddress: HostAddress) =>
389-
isHostMatch(COSMOS_DB_CHECK, hostAddress.host)
390-
);
387+
const cosmosDBHostnames = this[kOptions].hosts.filter((hostAddress: HostAddress) =>
388+
isHostMatch(COSMOS_DB_CHECK, hostAddress.host)
389+
);
391390

392-
const srvHostIsCosmosDB = isHostMatch(COSMOS_DB_CHECK, this[kOptions].srvHost);
391+
const srvHostIsCosmosDB = isHostMatch(COSMOS_DB_CHECK, this[kOptions].srvHost);
393392

394-
if (cosmosDBHostnames.length !== 0 || srvHostIsCosmosDB) {
395-
this.mongoLogger.info('client', COSMOS_DB_MSG);
396-
}
393+
if (cosmosDBHostnames.length !== 0 || srvHostIsCosmosDB) {
394+
this.mongoLogger.info('client', COSMOS_DB_MSG);
397395
}
398396
}
399397

0 commit comments

Comments
 (0)