Skip to content

armgit / umami

Public Imported from GitHub
0

Umami is a privacy-first web and product analytics platform. Traffic, campaigns, behavior, conversions, and revenue in one place. No cookies, no surveillance, self-hosted or in the cloud.

Fixed channels query. Closes #3245

Mike Caoa7ded80fb207
diff --git a/src/app/api/websites/[websiteId]/metrics/route.ts b/src/app/api/websites/[websiteId]/metrics/route.ts
index c09587394..1c3c804c7 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);
};
};