Skip to content

Commit 6309ff9

Browse files
committed
fix(useFunnelMetrics): ensure latency type defaults to P99 when undefined
1 parent af54aa4 commit 6309ff9

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

frontend/src/hooks/TracesFunnels/useFunnelMetrics.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,10 @@ export function useFunnelStepsMetrics({
9191
} = useFunnelStepsOverview(funnelId, payload);
9292

9393
const latencyType = useMemo(
94-
() => (stepStart ? steps[stepStart]?.latency_type : LatencyOptions.P99),
94+
() =>
95+
stepStart
96+
? steps[stepStart]?.latency_type ?? LatencyOptions.P99
97+
: LatencyOptions.P99,
9598
[stepStart, steps],
9699
);
97100

@@ -113,7 +116,7 @@ export function useFunnelStepsMetrics({
113116
),
114117
},
115118
{
116-
title: `${latencyType?.toUpperCase()} Latency`,
119+
title: `${latencyType.toUpperCase()} Latency`,
117120
value: getYAxisFormattedValue(
118121
(sourceData.latency * 1_000_000).toString(),
119122
'ns',

0 commit comments

Comments
 (0)