fix: NPS question issue

This commit is contained in:
Dhruwang
2023-09-22 14:25:54 +05:30
parent 01dcd55487
commit 0acc840ecd
2 changed files with 2 additions and 2 deletions

View File

@@ -40,7 +40,7 @@ export default function ResponseTimeline({
// iterate over survey questions and build the updated response
for (const question of survey.questions) {
const answer = response.data[question.id];
if (answer) {
if (answer !== null && answer !== undefined) {
updatedResponse.push({
id: createId(),
question: question.headline,

View File

@@ -55,7 +55,7 @@ export default function NPSQuestion({
onClick={() => {
if (question.required) {
onSubmit({
[question.id]: value,
[question.id]: number,
});
}
onChange({ [question.id]: number });