diff --git a/apps/builder/src/features/analytics/components/AnalyticsGraphContainer.tsx b/apps/builder/src/features/analytics/components/AnalyticsGraphContainer.tsx index 4ecea7a85..7713454c9 100644 --- a/apps/builder/src/features/analytics/components/AnalyticsGraphContainer.tsx +++ b/apps/builder/src/features/analytics/components/AnalyticsGraphContainer.tsx @@ -35,11 +35,11 @@ export const AnalyticsGraphContainer = ({ const { typebot, publishedTypebot } = useTypebot(); const { data } = trpc.analytics.getInDepthAnalyticsData.useQuery( { - typebotId: typebot?.id as string, + typebotId: typebot!.id, timeFilter, timeZone, }, - { enabled: isDefined(publishedTypebot) }, + { enabled: isDefined(typebot?.id) && isDefined(publishedTypebot) }, ); const edgesWithTotalUsers = useMemo(() => {