Skip to content

Commit 65467b0

Browse files
committed
refactor(MongoMemoryServer): convert one if to optional-chaining
1 parent c7328c9 commit 65467b0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/mongodb-memory-server-core/src/MongoMemoryServer.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ export default class MongoMemoryServer {
9898
.catch((err) => {
9999
if (err.message === 'Mongod shutting down' || err === 'Mongod shutting down') {
100100
log(`Mongodb did not start. Trying to start on another port one more time...`);
101-
if (this.opts.instance && this.opts.instance.port) {
101+
if (this.opts.instance?.port) {
102102
this.opts.instance.port = null;
103103
}
104104
return this._startUpInstance();

0 commit comments

Comments
 (0)