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.

use || instead of ??

Steven Tey063369fd48b6
diff --git a/apps/web/lib/tolt/import-customers.ts b/apps/web/lib/tolt/import-customers.ts
index 4f39b8cc46..c1176ff48d 100644
--- a/apps/web/lib/tolt/import-customers.ts
+++ b/apps/web/lib/tolt/import-customers.ts
@@ -129,7 +129,7 @@ async function createReferral({
import_id: importId,
source: "tolt",
entity: "customer",
- entity_id: customer.customer_id ?? customer.email ?? customer.id,
+ entity_id: customer.customer_id || customer.email || customer.id,
} as const;
if (links.length === 0) {
@@ -144,7 +144,7 @@ async function createReferral({
// if customer_id is null, use customer email or Tolt customer ID as the external ID
const customerExternalId =
- customer.customer_id ?? customer.email ?? customer.id;
+ customer.customer_id || customer.email || customer.id;
const customerFound = await prisma.customer.findUnique({
where: {