From 665bc2d7fc6ab6f228d61099a360ca3d76906d10 Mon Sep 17 00:00:00 2001 From: Juraj Majerik Date: Thu, 19 Oct 2023 09:16:41 +0200 Subject: [PATCH] fix(surveys): check result exists (#18082) --- frontend/src/scenes/surveys/surveyViewViz.tsx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/frontend/src/scenes/surveys/surveyViewViz.tsx b/frontend/src/scenes/surveys/surveyViewViz.tsx index 25111e3cf9f35..ad4a95e86ac89 100644 --- a/frontend/src/scenes/surveys/surveyViewViz.tsx +++ b/frontend/src/scenes/surveys/surveyViewViz.tsx @@ -183,7 +183,7 @@ export function RatingQuestionBarChart({
{!surveyRatingResultsReady[questionIndex] ? ( - ) : !surveyRatingResults[questionIndex].total ? ( + ) : !surveyRatingResults[questionIndex]?.total ? ( <> ) : (
@@ -282,7 +282,7 @@ export function SingleChoiceQuestionPieChart({
{!surveySingleChoiceResultsReady[questionIndex] ? ( - ) : !surveySingleChoiceResults[questionIndex].data.length ? ( + ) : !surveySingleChoiceResults[questionIndex]?.data.length ? ( <> ) : (
@@ -382,7 +382,7 @@ export function MultipleChoiceQuestionBarChart({
{!surveyMultipleChoiceResultsReady[questionIndex] ? ( - ) : !surveyMultipleChoiceResults[questionIndex].data.length ? ( + ) : !surveyMultipleChoiceResults[questionIndex]?.data.length ? ( <> ) : (
@@ -453,7 +453,7 @@ export function OpenTextViz({
{!surveyOpenTextResultsReady[questionIndex] ? ( - ) : !surveyOpenTextResults[questionIndex].events.length ? ( + ) : !surveyOpenTextResults[questionIndex]?.events.length ? ( <> ) : ( <>