From 646de768996498a78995db4bcfd4e0ae2854566b Mon Sep 17 00:00:00 2001 From: Daniel Bachhuber Date: Fri, 13 Dec 2024 05:20:25 -0800 Subject: [PATCH] fix(experiments): Prevent Goal component from crashing (#26896) --- frontend/src/scenes/experiments/ExperimentView/Goal.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/frontend/src/scenes/experiments/ExperimentView/Goal.tsx b/frontend/src/scenes/experiments/ExperimentView/Goal.tsx index 8fca7a46493f0..59766e480529f 100644 --- a/frontend/src/scenes/experiments/ExperimentView/Goal.tsx +++ b/frontend/src/scenes/experiments/ExperimentView/Goal.tsx @@ -253,7 +253,8 @@ export function Goal(): JSX.Element { // :FLAG: CLEAN UP AFTER MIGRATION const isDataWarehouseMetric = featureFlags[FEATURE_FLAGS.EXPERIMENTS_HOGQL] && - (experiment.metrics[0] as ExperimentTrendsQuery).count_query.series[0].kind === NodeKind.DataWarehouseNode + metricType === InsightType.TRENDS && + (experiment.metrics[0] as ExperimentTrendsQuery).count_query?.series[0].kind === NodeKind.DataWarehouseNode return (