Skip to content

armgit / dub

Public Imported from GitHub
0

The modern link attribution platform. Loved by world-class engineering teams at Twilio, Zillow, Jobber, Vercel, Raycast, and more.

make nullish

Kiran K96041196960d
diff --git a/apps/web/lib/zod/schemas/leads.ts b/apps/web/lib/zod/schemas/leads.ts
index bd348009e6..6d555e01dd 100644
--- a/apps/web/lib/zod/schemas/leads.ts
+++ b/apps/web/lib/zod/schemas/leads.ts
@@ -131,7 +131,7 @@ export const leadEventResponseSchema = z
eventName: z.string(),
metadata: z
.string()
- .nullable()
+ .nullish()
.transform((val) => (val === "" ? null : val))
.default(null),
// nested objects
diff --git a/apps/web/lib/zod/schemas/sales.ts b/apps/web/lib/zod/schemas/sales.ts
index 2518691133..617020db48 100644
--- a/apps/web/lib/zod/schemas/sales.ts
+++ b/apps/web/lib/zod/schemas/sales.ts
@@ -162,7 +162,7 @@ export const saleEventResponseSchema = z
.describe("Deprecated. Use `sale.paymentProcessor` instead."),
metadata: z
.string()
- .nullable()
+ .nullish()
.transform((val) => (val === "" ? null : val))
.default(null),
})