🚸 (googleSheets) Set value to null if not found from sheet
This commit is contained in:
@@ -188,8 +188,8 @@ const getRowFromGoogleSheets = async (
|
|||||||
const newVariables = options.cellsToExtract.reduce<VariableWithValue[]>(
|
const newVariables = options.cellsToExtract.reduce<VariableWithValue[]>(
|
||||||
(newVariables, cell) => {
|
(newVariables, cell) => {
|
||||||
const existingVariable = variables.find(byId(cell.variableId))
|
const existingVariable = variables.find(byId(cell.variableId))
|
||||||
const value = data[cell.column ?? '']
|
const value = data[cell.column ?? ''] ?? null
|
||||||
if (!existingVariable || !value) return newVariables
|
if (!existingVariable) return newVariables
|
||||||
updateVariableValue(existingVariable.id, value)
|
updateVariableValue(existingVariable.id, value)
|
||||||
return [
|
return [
|
||||||
...newVariables,
|
...newVariables,
|
||||||
|
|||||||
Reference in New Issue
Block a user