fix(workflows-sdk): Value resolver should resolve non StepResponse (#6726)
This commit is contained in:
committed by
GitHub
parent
0c705d7bd4
commit
4b06c17dc0
@@ -1,4 +1,4 @@
|
||||
import { OrchestrationUtils, deepCopy, promiseAll } from "@medusajs/utils"
|
||||
import { deepCopy, OrchestrationUtils, promiseAll } from "@medusajs/utils"
|
||||
|
||||
async function resolveProperty(property, transactionContext) {
|
||||
const { invoke: invokeRes } = transactionContext
|
||||
@@ -12,7 +12,8 @@ async function resolveProperty(property, transactionContext) {
|
||||
} else if (property?.__type === OrchestrationUtils.SymbolWorkflowHook) {
|
||||
return await property.__value(transactionContext)
|
||||
} else if (property?.__type === OrchestrationUtils.SymbolWorkflowStep) {
|
||||
const output = invokeRes[property.__step__]?.output
|
||||
const output =
|
||||
invokeRes[property.__step__]?.output ?? invokeRes[property.__step__]
|
||||
if (output?.__type === OrchestrationUtils.SymbolWorkflowStepResponse) {
|
||||
return output.output
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user