diff --git a/apps/web/app/(app)/environments/[environmentId]/surveys/[surveyId]/(analysis)/responses/ResponseTimeline.tsx b/apps/web/app/(app)/environments/[environmentId]/surveys/[surveyId]/(analysis)/responses/ResponseTimeline.tsx index 2bb820ab6c..dda0c4db08 100644 --- a/apps/web/app/(app)/environments/[environmentId]/surveys/[surveyId]/(analysis)/responses/ResponseTimeline.tsx +++ b/apps/web/app/(app)/environments/[environmentId]/surveys/[surveyId]/(analysis)/responses/ResponseTimeline.tsx @@ -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, diff --git a/packages/surveys/src/components/NPSQuestion.tsx b/packages/surveys/src/components/NPSQuestion.tsx index 09d0270ce4..9c8c0e18a7 100644 --- a/packages/surveys/src/components/NPSQuestion.tsx +++ b/packages/surveys/src/components/NPSQuestion.tsx @@ -55,7 +55,7 @@ export default function NPSQuestion({ onClick={() => { if (question.required) { onSubmit({ - [question.id]: value, + [question.id]: number, }); } onChange({ [question.id]: number });