check that debugController exists

This commit is contained in:
LenAnderson 2024-07-24 21:00:58 -04:00
parent ed54ee1808
commit 50cba9622c
1 changed files with 5 additions and 3 deletions

View File

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