The modern link attribution platform. Loved by world-class engineering teams at Twilio, Zillow, Jobber, Vercel, Raycast, and more.
TypeScript clickhousemysqlnextjsopen-sourceplanetscaleprismatailwindcsstinybirdtypescriptupstashvercel
Fix null/undefined logic
Tim Wilson56d1ef53c619
diff --git a/apps/web/lib/api/partners/get-partner-for-program.ts b/apps/web/lib/api/partners/get-partner-for-program.tsindex d2bd4427c4..fa890b000f 100644--- a/apps/web/lib/api/partners/get-partner-for-program.ts+++ b/apps/web/lib/api/partners/get-partner-for-program.ts@@ -107,9 +107,9 @@ export async function getPartnerForProgram({saleAmount: Number(partner[0].totalSaleAmount),totalCommissions: Number(partner[0].totalCommissions),netRevenue: Number(partner[0].netRevenue),- industryInterests: partner[0].industryInterests.split(","),+ industryInterests: partner[0].industryInterests?.split(",") || undefined,preferredEarningStructures:- partner[0].preferredEarningStructures.split(","),- salesChannels: partner[0].salesChannels.split(","),+ partner[0].preferredEarningStructures?.split(",") || undefined,+ salesChannels: partner[0].salesChannels?.split(",") || undefined,};}