From 5162a84246ecfa0e61c8b50d6e44fa345401aca5 Mon Sep 17 00:00:00 2001 From: joe-shajan Date: Wed, 5 Jul 2023 16:24:34 +0530 Subject: [PATCH] fix: display user email in responses --- .../surveys/[surveyId]/responses/SingleResponse.tsx | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/apps/web/app/environments/[environmentId]/surveys/[surveyId]/responses/SingleResponse.tsx b/apps/web/app/environments/[environmentId]/surveys/[surveyId]/responses/SingleResponse.tsx index c88a356403..a8ed129206 100644 --- a/apps/web/app/environments/[environmentId]/surveys/[surveyId]/responses/SingleResponse.tsx +++ b/apps/web/app/environments/[environmentId]/surveys/[surveyId]/responses/SingleResponse.tsx @@ -41,8 +41,7 @@ export interface OpenTextSummaryProps { } function findEmail(person) { - const emailAttribute = person.attributes.email; - return emailAttribute ? emailAttribute.value : null; + return person.attributes?.email || null; } interface TooltipRendererProps {