From a7ded80fb2073b288695351b666cf18a3e2ccafb Mon Sep 17 00:00:00 2001 From: Mike Cao Date: Fri, 21 Feb 2025 18:33:42 -0800 Subject: [PATCH] Fixed channels query. Closes #3245 --- src/app/api/websites/[websiteId]/metrics/route.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app/api/websites/[websiteId]/metrics/route.ts b/src/app/api/websites/[websiteId]/metrics/route.ts index c095873948..1c3c804c70 100644 --- a/src/app/api/websites/[websiteId]/metrics/route.ts +++ b/src/app/api/websites/[websiteId]/metrics/route.ts @@ -125,7 +125,7 @@ function getChannels(data: { domain: string; query: string; visitors: number }[] const match = (value: string) => { return (str: string | RegExp) => { - return typeof str === 'string' ? value.includes(str) : (str as RegExp).test(value); + return typeof str === 'string' ? value?.includes(str) : (str as RegExp).test(value); }; };