Update application.ts (#4006)

The runAsCLI function's options argument is an optional argument. However, there were instances where it was being treated as a regular argument, which was causing errors. I have changed it to be nullable.
This commit is contained in:
s1v 2024-04-11 01:18:30 +09:00 committed by GitHub
parent 89ad13de29
commit 699fd52b8e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -731,7 +731,7 @@ export class Application<StateT = DefaultState, ContextT = DefaultContext> exten
if (this.activatedCommand) {
return;
}
if (options.reqId) {
if (options?.reqId) {
this.context.reqId = options.reqId;
this._logger = this._logger.child({ reqId: this.context.reqId });
}