2
0

🚑 (results) Fix results display when variable has null value

This commit is contained in:
Baptiste Arnaud
2022-11-22 18:03:41 +01:00
parent 11695efb57
commit e6dceca9f3
6 changed files with 11 additions and 14 deletions

View File

@ -3,7 +3,6 @@ import {
Variable,
InputBlock,
ResultHeaderCell,
ResultWithAnswers,
Answer,
VariableWithValue,
Typebot,
@ -209,7 +208,7 @@ export const parseAnswers =
}
}
const variable = answerOrVariable as VariableWithValue
if (isDefined(o[variable.name])) return o
if (isDefined(o[variable.name]) || variable.value === null) return o
return { ...o, [variable.name]: variable.value }
}, {}),
}