From a3570d62e5a2b47c152f3cf71e80b676f80cddb6 Mon Sep 17 00:00:00 2001 From: Jijeong Lee Date: Sat, 25 May 2024 00:19:37 -0700 Subject: [PATCH] type error handling --- www/js/metrics/SurveyComparisonCard.tsx | 4 ++-- www/js/metrics/SurveyTripCategoriesCard.tsx | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/www/js/metrics/SurveyComparisonCard.tsx b/www/js/metrics/SurveyComparisonCard.tsx index fcbce61ff..9b1f31816 100644 --- a/www/js/metrics/SurveyComparisonCard.tsx +++ b/www/js/metrics/SurveyComparisonCard.tsx @@ -29,8 +29,8 @@ function getResponsePctForDays(days: DayOfMetricData<'response_count'>[]) { } type Props = { - userMetrics: MetricsData; - aggMetrics: MetricsData; + userMetrics: MetricsData | undefined; + aggMetrics: MetricsData | undefined; }; export type SurveyComparison = { diff --git a/www/js/metrics/SurveyTripCategoriesCard.tsx b/www/js/metrics/SurveyTripCategoriesCard.tsx index 45e9f9286..7c6e6e464 100644 --- a/www/js/metrics/SurveyTripCategoriesCard.tsx +++ b/www/js/metrics/SurveyTripCategoriesCard.tsx @@ -28,8 +28,8 @@ type SurveyTripRecord = { }; type Props = { - userMetrics: MetricsData; - aggMetrics: MetricsData; + userMetrics: MetricsData | undefined; + aggMetrics: MetricsData | undefined; }; const SurveyTripCategoriesCard = ({ userMetrics, aggMetrics }: Props) => { const { colors } = useAppTheme();