2
0

fix(results): 🐛 Fix variables parsing

This commit is contained in:
Baptiste Arnaud
2022-04-06 10:31:02 +02:00
parent 5ce0212476
commit e9c3ec1e46
2 changed files with 7 additions and 3 deletions

View File

@ -114,8 +114,8 @@ export const parseAnswers =
}
}
const variable = answerOrVariable as VariableWithValue
if (isDefined(o[variable.id])) return o
return { ...o, [variable.id]: variable.value }
if (isDefined(o[variable.name])) return o
return { ...o, [variable.name]: variable.value }
}, {}),
}
}