The modern link attribution platform. Loved by world-class engineering teams at Twilio, Zillow, Jobber, Vercel, Raycast, and more.
TypeScript clickhousemysqlnextjsopen-sourceplanetscaleprismatailwindcsstinybirdtypescriptupstashvercel
Add type predicate for filtering out `null`
Tim Wilson69ecbd921aee
diff --git a/apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/program/analytics/analytics-partners-table.tsx b/apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/program/analytics/analytics-partners-table.tsxindex 214868d22b..432e83f463 100644--- a/apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/program/analytics/analytics-partners-table.tsx+++ b/apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/program/analytics/analytics-partners-table.tsx@@ -66,7 +66,7 @@ export function AnalyticsPartnersTable() {}: null;})- .filter((p) => p !== null);+ .filter(isNotNull);}, [topPartnersPage, partners]);const { table, ...tableProps } = useTable({@@ -78,7 +78,6 @@ export function AnalyticsPartnersTable() {enableHiding: false,minSize: 250,cell: ({ row }) => {- // @ts-ignore - fine locally but Vercel build fails due to `null` from `filter`return <PartnerRowItem partner={row.original} />;},meta: {@@ -157,3 +156,7 @@ export function AnalyticsPartnersTable() {</div>);}++// Don't seem to need this locally but the Vercel build fails without a type predicate+const isNotNull = <T extends unknown>(item: T | null): item is T =>+ item !== null;