fix(workflows-sdk): when then return value (#9427)

This commit is contained in:
Carlos R. L. Rodrigues
2024-10-02 07:40:39 -03:00
committed by GitHub
parent cb5c228a36
commit 8155c4e9ee
3 changed files with 44 additions and 3 deletions

View File

@@ -22,9 +22,11 @@ export class OrchestratorBuilder {
this.steps = {
depth: -1,
parent: null,
next: steps
next: Object.keys(steps ?? {}).length
? JSON.parse(
JSON.stringify((steps.action ? steps : steps.next) as InternalStep)
JSON.stringify(
(steps!.action ? steps : steps!.next) as InternalStep
)
)
: undefined,
}