🚑 Fix inline code evaluation
This commit is contained in:
@ -73,8 +73,9 @@ const evaluateInlineCode = (
|
|||||||
{ variables }: { variables: Variable[] }
|
{ variables }: { variables: Variable[] }
|
||||||
) => {
|
) => {
|
||||||
try {
|
try {
|
||||||
|
const body = parseVariables(variables, { fieldToParse: 'id' })(code)
|
||||||
return createCodeRunner({ variables })(
|
return createCodeRunner({ variables })(
|
||||||
parseVariables(variables, { fieldToParse: 'id' })(code)
|
body.includes('return ') ? body : `return ${body}`
|
||||||
)
|
)
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
return parseVariables(variables)(code)
|
return parseVariables(variables)(code)
|
||||||
|
Reference in New Issue
Block a user