Skip to content

Commit

Permalink
🚑 (httpRequests) Fix save variable parsing
Browse files Browse the repository at this point in the history
  • Loading branch information
baptisteArno committed May 21, 2024
1 parent 9b8298b commit 304bfcf
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -57,11 +57,11 @@ export const resumeWebhookExecution = ({
const existingVariable = typebot.variables.find(byId(varMapping.variableId))
if (!existingVariable) return newVariables
const sandbox = vm.createContext({
data: response.data,
data: response,
})
try {
const value: unknown = vm.runInContext(
parseVariables(typebot.variables)(varMapping?.bodyPath),
`data.${parseVariables(typebot.variables)(varMapping?.bodyPath)}`,
sandbox
)
return [...newVariables, { ...existingVariable, value }]
Expand Down

0 comments on commit 304bfcf

Please sign in to comment.