🐛 (setVariable) Avoid octal number evalution
This commit is contained in:
@ -63,6 +63,8 @@ const evaluateSetVariableExpression =
|
||||
const isSingleVariable =
|
||||
str.startsWith('{{') && str.endsWith('}}') && str.split('{{').length === 2
|
||||
if (isSingleVariable) return parseVariables(variables)(str)
|
||||
// To avoid octal number evaluation
|
||||
if (!isNaN(str as unknown as number) && /0[^.].+/.test(str)) return str
|
||||
const evaluating = parseVariables(variables, { fieldToParse: 'id' })(
|
||||
str.includes('return ') ? str : `return ${str}`
|
||||
)
|
||||
|
Reference in New Issue
Block a user