⚡ Remove empty strings from variable parsing when possible
This commit is contained in:
@ -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,
|
||||
|
@ -21,7 +21,7 @@ export const getRow = async (
|
||||
const logs: ChatLog[] = []
|
||||
const { variables } = state.typebotsQueue[0].typebot
|
||||
const { sheetId, cellsToExtract, filter, ...parsedOptions } =
|
||||
deepParseVariables(variables)(options)
|
||||
deepParseVariables(variables, { removeEmptyStrings: true })(options)
|
||||
if (!sheetId) return { outgoingEdgeId }
|
||||
|
||||
const doc = await getAuthenticatedGoogleDoc({
|
||||
|
@ -17,8 +17,9 @@ export const updateRow = async (
|
||||
}: { outgoingEdgeId?: string; options: GoogleSheetsUpdateRowOptions }
|
||||
): Promise<ExecuteIntegrationResponse> => {
|
||||
const { variables } = state.typebotsQueue[0].typebot
|
||||
const { sheetId, filter, ...parsedOptions } =
|
||||
deepParseVariables(variables)(options)
|
||||
const { sheetId, filter, ...parsedOptions } = deepParseVariables(variables, {
|
||||
removeEmptyStrings: true,
|
||||
})(options)
|
||||
|
||||
const referenceCell =
|
||||
'referenceCell' in parsedOptions && parsedOptions.referenceCell
|
||||
|
Reference in New Issue
Block a user