From cbf88b2f07f9a887fa4eb2bc0faff6737dfad6c0 Mon Sep 17 00:00:00 2001 From: Anirudh Pillai Date: Fri, 28 Feb 2025 19:20:53 +0000 Subject: [PATCH] fix(retention): fix showing mean (#29374) --- frontend/src/scenes/retention/RetentionTable.tsx | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/frontend/src/scenes/retention/RetentionTable.tsx b/frontend/src/scenes/retention/RetentionTable.tsx index a8188ac495b03..2eb1984b88a08 100644 --- a/frontend/src/scenes/retention/RetentionTable.tsx +++ b/frontend/src/scenes/retention/RetentionTable.tsx @@ -52,6 +52,10 @@ export function RetentionTable({ inSharedMode = false }: { inSharedMode?: boolea percentage={ mean( tableRows.map((row) => { + if (columnIndex >= row.length) { + return null + } + // Stop before the last item in a row, which is an incomplete time period if ( (columnIndex >= row.length - 1 &&