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[] } { variables }: { variables: Variable[] }
) => { ) => {
const evaluating = parseVariables(variables, { fieldToParse: 'id' })( const evaluating = parseVariables(variables, { fieldToParse: 'id' })(
`(async function() {${ `(function() {
code.includes('return ') ? code : 'return ' + code ${code.includes('return ') ? code : 'return ' + code}
}})()` })()`
) )
try { try {
const sandbox = vm.createContext({ const sandbox = vm.createContext({