The modern link attribution platform. Loved by world-class engineering teams at Twilio, Zillow, Jobber, Vercel, Raycast, and more.
TypeScript clickhousemysqlnextjsopen-sourceplanetscaleprismatailwindcsstinybirdtypescriptupstashvercel
fix(advanced-filters): Add typeof guard for regionForPipe to match the pattern used
Pedro Ladeira00684ac884f8
diff --git a/apps/web/lib/analytics/get-events.ts b/apps/web/lib/analytics/get-events.tsindex 54ae07818d..0a611612ab 100644--- a/apps/web/lib/analytics/get-events.ts+++ b/apps/web/lib/analytics/get-events.ts@@ -130,7 +130,7 @@ export const getEvents = async (params: EventsFilters) => {groupId: params.groupId,...(typeof triggerForPipe !== 'object' && triggerForPipe ? { trigger: triggerForPipe } : {}),...(typeof countryForPipe !== 'object' && countryForPipe ? { country: countryForPipe } : {}),- ...(regionForPipe ? { region: regionForPipe } : {}),+ ...(typeof regionForPipe === 'string' ? { region: regionForPipe } : {}),// Workspace links filters with operators...(domainParam ? { domain: domainParam, domainOperator } : {}),...(tagIdsParam ? { tagIds: tagIdsParam, tagIdsOperator } : {}),