check that debugController exists

This commit is contained in:
LenAnderson 2024-07-24 21:00:58 -04:00
parent ed54ee1808
commit 50cba9622c

View File

@ -275,9 +275,11 @@ export class SlashCommandClosure {
let isFirst = true;
for (const executor of this.executorList) {
this.onProgress?.(done, this.commandCount);
this.debugController?.setExecutor(executor);
if (this.debugController) {
this.debugController.setExecutor(executor);
this.debugController.namedArguments = undefined;
this.debugController.unnamedArguments = undefined;
}
// yield before doing anything with this executor, the debugger might want to do
// something with it (e.g., breakpoint, immediate closures that need resolving
// or stepping into)