🚑 (setVariable) Fix inline code parser
This commit is contained in:
@ -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({
|
||||||
|
Reference in New Issue
Block a user