Skip to content

Commit

Permalink
feat: update flows
Browse files Browse the repository at this point in the history
Signed-off-by: Tomas Dvorak <toomas2d@gmail.com>
  • Loading branch information
Tomas2D committed Dec 19, 2024
1 parent a0a303f commit 4a9ef27
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/experimental/flows.ts
Original file line number Diff line number Diff line change
Expand Up @@ -249,12 +249,12 @@ export class Flow<
next = run.steps.at(0)?.name!;
} else if (response.next === Flow.PREV) {
next = run.steps.at(-2)?.name!;
} else if (response.next === Flow.NEXT) {
next = this.findStep(next).next;
} else if (response.next === Flow.SELF) {
next = run.steps.at(-1)?.name!;
} else if (!response.next || response.next === Flow.NEXT) {
next = this.findStep(next).next || Flow.END;
} else {
next = response.next || Flow.END;
next = response.next;
}
} catch (error) {
await runContext.emitter.emit("error", {
Expand Down

0 comments on commit 4a9ef27

Please sign in to comment.