From db845d6c0405289a8008f7d0989a83724ded58fe Mon Sep 17 00:00:00 2001 From: Francis Cao Date: Fri, 7 Apr 2023 10:28:54 -0700 Subject: [PATCH] remove urlpath conditional --- components/pages/realtime/RealtimeUrls.js | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/components/pages/realtime/RealtimeUrls.js b/components/pages/realtime/RealtimeUrls.js index e2e52715..06e81580 100644 --- a/components/pages/realtime/RealtimeUrls.js +++ b/components/pages/realtime/RealtimeUrls.js @@ -53,14 +53,12 @@ export default function RealtimeUrls({ websiteDomain, data = {} }) { const pages = percentFilter( pageviews .reduce((arr, { urlPath }) => { - if (urlPath?.startsWith('/')) { - const row = arr.find(({ x }) => x === urlPath); + const row = arr.find(({ x }) => x === urlPath); - if (!row) { - arr.push({ x: urlPath, y: 1 }); - } else { - row.y += 1; - } + if (!row) { + arr.push({ x: urlPath, y: 1 }); + } else { + row.y += 1; } return arr; }, [])