🚑 (httpRequests) Fix save variable parsing
This commit is contained in:
@ -57,11 +57,11 @@ export const resumeWebhookExecution = ({
|
|||||||
const existingVariable = typebot.variables.find(byId(varMapping.variableId))
|
const existingVariable = typebot.variables.find(byId(varMapping.variableId))
|
||||||
if (!existingVariable) return newVariables
|
if (!existingVariable) return newVariables
|
||||||
const sandbox = vm.createContext({
|
const sandbox = vm.createContext({
|
||||||
data: response.data,
|
data: response,
|
||||||
})
|
})
|
||||||
try {
|
try {
|
||||||
const value: unknown = vm.runInContext(
|
const value: unknown = vm.runInContext(
|
||||||
parseVariables(typebot.variables)(varMapping?.bodyPath),
|
`data.${parseVariables(typebot.variables)(varMapping?.bodyPath)}`,
|
||||||
sandbox
|
sandbox
|
||||||
)
|
)
|
||||||
return [...newVariables, { ...existingVariable, value }]
|
return [...newVariables, { ...existingVariable, value }]
|
||||||
|
Reference in New Issue
Block a user