2
0

🚸 (googleSheets) Set value to null if not found from sheet

This commit is contained in:
Baptiste Arnaud
2022-10-31 19:22:50 +01:00
parent d132cb118a
commit 48285479cc

View File

@ -188,8 +188,8 @@ const getRowFromGoogleSheets = async (
const newVariables = options.cellsToExtract.reduce<VariableWithValue[]>(
(newVariables, cell) => {
const existingVariable = variables.find(byId(cell.variableId))
const value = data[cell.column ?? '']
if (!existingVariable || !value) return newVariables
const value = data[cell.column ?? ''] ?? null
if (!existingVariable) return newVariables
updateVariableValue(existingVariable.id, value)
return [
...newVariables,