Skip to content

Commit

Permalink
Fixed channels query. Closes umami-software#3245
Browse files Browse the repository at this point in the history
  • Loading branch information
mikecao committed Feb 22, 2025
1 parent 0aad3d8 commit a7ded80
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/app/api/websites/[websiteId]/metrics/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
};
};

Expand Down

0 comments on commit a7ded80

Please sign in to comment.