Skip to content

Commit

Permalink
fix(surveys): check result exists (#18082)
Browse files Browse the repository at this point in the history
  • Loading branch information
jurajmajerik authored Oct 19, 2023
1 parent 3fe9dc2 commit 665bc2d
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions frontend/src/scenes/surveys/surveyViewViz.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ export function RatingQuestionBarChart({
<div className="mb-4">
{!surveyRatingResultsReady[questionIndex] ? (
<LemonTable dataSource={[]} columns={[]} loading={true} />
) : !surveyRatingResults[questionIndex].total ? (
) : !surveyRatingResults[questionIndex]?.total ? (
<></>
) : (
<div className="mb-8">
Expand Down Expand Up @@ -282,7 +282,7 @@ export function SingleChoiceQuestionPieChart({
<div className="mb-4">
{!surveySingleChoiceResultsReady[questionIndex] ? (
<LemonTable dataSource={[]} columns={[]} loading={true} />
) : !surveySingleChoiceResults[questionIndex].data.length ? (
) : !surveySingleChoiceResults[questionIndex]?.data.length ? (
<></>
) : (
<div className="mb-8">
Expand Down Expand Up @@ -382,7 +382,7 @@ export function MultipleChoiceQuestionBarChart({
<div className="mb-4">
{!surveyMultipleChoiceResultsReady[questionIndex] ? (
<LemonTable dataSource={[]} columns={[]} loading={true} />
) : !surveyMultipleChoiceResults[questionIndex].data.length ? (
) : !surveyMultipleChoiceResults[questionIndex]?.data.length ? (
<></>
) : (
<div className="mb-8">
Expand Down Expand Up @@ -453,7 +453,7 @@ export function OpenTextViz({
<div className="mb-4">
{!surveyOpenTextResultsReady[questionIndex] ? (
<LemonTable dataSource={[]} columns={[]} loading={true} />
) : !surveyOpenTextResults[questionIndex].events.length ? (
) : !surveyOpenTextResults[questionIndex]?.events.length ? (
<></>
) : (
<>
Expand Down

0 comments on commit 665bc2d

Please sign in to comment.