2
0

Remove empty strings from variable parsing when possible

This commit is contained in:
Baptiste Arnaud
2024-04-18 10:17:25 +02:00
parent fb847e17dd
commit 3ca1a2f0d6
7 changed files with 34 additions and 17 deletions

View File

@@ -8,9 +8,11 @@ export const parseDateInput =
const variables = state.typebotsQueue[0].typebot.variables
if (!block.options) return deepParseVariables(variables)(block)
return {
...deepParseVariables(variables)(block),
...block,
options: {
...deepParseVariables(variables)(block.options),
...deepParseVariables(variables, { removeEmptyStrings: true })(
block.options
),
min: parseDateLimit(
block.options.min,
block.options.hasTime,