Skip to content

Commit f38aea5

Browse files
committed
refactor: return koptions directly
1 parent 84de096 commit f38aea5

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/mongo_client.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -425,7 +425,7 @@ export class MongoClient extends TypedEventEmitter<MongoClientEvents> {
425425

426426
/** @see MongoOptions */
427427
get options(): Readonly<MongoOptions> {
428-
return Object.freeze({ ...this[kOptions] });
428+
return this[kOptions];
429429
}
430430

431431
get serverApi(): Readonly<ServerApi | undefined> {

src/sessions.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ export class ClientSession extends TypedEventEmitter<ClientSessionEvents> {
174174
this.sessionPool = sessionPool;
175175
this.hasEnded = false;
176176
this.clientOptions = clientOptions;
177-
this.timeoutMS = options.defaultTimeoutMS ?? client.s.options?.timeoutMS;
177+
this.timeoutMS = options.defaultTimeoutMS ?? client.options?.timeoutMS;
178178

179179
this.explicit = !!options.explicit;
180180
this[kServerSession] = this.explicit ? this.sessionPool.acquire() : null;

0 commit comments

Comments
 (0)