From 91603aa6cee6b6effd20ef8a2ab6de1cee0f534c Mon Sep 17 00:00:00 2001 From: Baptiste Arnaud Date: Wed, 15 May 2024 15:25:15 +0200 Subject: [PATCH] :ambulance: (setVariable) Fix inline code parser --- packages/variables/parseVariables.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/variables/parseVariables.ts b/packages/variables/parseVariables.ts index bdbc20cef..7f511bce1 100644 --- a/packages/variables/parseVariables.ts +++ b/packages/variables/parseVariables.ts @@ -74,9 +74,9 @@ const evaluateInlineCode = ( { variables }: { variables: Variable[] } ) => { const evaluating = parseVariables(variables, { fieldToParse: 'id' })( - `(async function() {${ - code.includes('return ') ? code : 'return ' + code - }})()` + `(function() { + ${code.includes('return ') ? code : 'return ' + code} + })()` ) try { const sandbox = vm.createContext({