2
0

🚑 (setVariable) Fix inline code parser

This commit is contained in:
Baptiste Arnaud
2024-05-15 15:25:15 +02:00
parent 41ccf24348
commit 91603aa6ce

View File

@ -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({