2
0

🐛 (number) Fix number input validation with variables

This commit is contained in:
Baptiste Arnaud
2023-10-30 16:45:32 +01:00
parent 3e02436d30
commit 7586ecaf13
2 changed files with 29 additions and 7 deletions

View File

@@ -345,7 +345,10 @@ const parseReply =
}
case InputBlockType.NUMBER: {
if (!inputValue) return { status: 'fail' }
const isValid = validateNumber(inputValue, block.options)
const isValid = validateNumber(inputValue, {
options: block.options,
variables: state.typebotsQueue[0].typebot.variables,
})
if (!isValid) return { status: 'fail' }
return { status: 'success', reply: parseNumber(inputValue) }
}