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.
TypeScript analyticsaudience-segmentationchartscohort-analysisgoogle-analyticsproduct-analyticsstatisticsuser-journeyweb-analytics
Fixed filter search.
Mike Cao99559c2b352a
diff --git a/src/components/hooks/queries/useWebsiteValues.ts b/src/components/hooks/queries/useWebsiteValues.tsindex 892af6ad4..73a7c7553 100644--- a/src/components/hooks/queries/useWebsiteValues.ts+++ b/src/components/hooks/queries/useWebsiteValues.ts@@ -28,17 +28,22 @@ export function useWebsiteValues({const getSearch = (type: string, value: string) => {if (value) {const values = names[type];- return (- Object.keys(values)- .reduce((arr: string[], key: string) => {- if (values[key].toLowerCase().includes(value.toLowerCase())) {- return arr.concat(key);- }- return arr;- }, [])- .slice(0, 5)- .join(',') || value- );++ if (values) {+ return (+ Object.keys(values)+ .reduce((arr: string[], key: string) => {+ if (values[key].toLowerCase().includes(value.toLowerCase())) {+ return arr.concat(key);+ }+ return arr;+ }, [])+ .slice(0, 5)+ .join(',') || value+ );+ }++ return value;}};