Skip to content

Commit

Permalink
Fix error when execution finishes but no input groups exist
Browse files Browse the repository at this point in the history
  • Loading branch information
gingershaped committed Jan 12, 2025
1 parent bff0a60 commit dfa7314
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/latest/scripts/interpreter/runner.ts
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ export class VyRunner extends TypedEventTarget<VyRunnerEvents> {
}
const now = performance.now();
this.terminal?.writeln(`\n\x1b[0G\x1b[0;2mFinished in ${Math.round((now - this.groupStartedAt)) / 1000} seconds\x1b[0m`);
if (this.outputBuffer.at(-1)!.join("").trim() == this.inputs[this.currentGroup].name) {
if (this.inputs.length > 0 && this.outputBuffer.at(-1)!.join("").trim() == this.inputs[this.currentGroup].name) {
this.dispatchTypedEvent("groupSucceeded", new CustomEvent(
"groupSucceeded", { detail: { group: this.currentGroup } },
));
Expand Down

0 comments on commit dfa7314

Please sign in to comment.