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 Teyc362a05d0cc5
diff --git a/apps/web/lib/api/audit-logs/record-audit-log.ts b/apps/web/lib/api/audit-logs/record-audit-log.ts
index e601ba35fc..6f3f3d1185 100644
--- a/apps/web/lib/api/audit-logs/record-audit-log.ts
+++ b/apps/web/lib/api/audit-logs/record-audit-log.ts
@@ -28,15 +28,15 @@ const transformAuditLogTB = (data: AuditLogInput) => {
program_id: auditLogInput.programId,
action: auditLogInput.action,
actor_id: auditLogInput.actor.id,
- actor_type: auditLogInput.actor.type || "user",
- actor_name: auditLogInput.actor.name || "",
- description: auditLogInput.description || "",
+ actor_type: auditLogInput.actor.type ?? "user",
+ actor_name: auditLogInput.actor.name ?? "",
+ description: auditLogInput.description ?? "",
targets: auditLogInput.targets ? JSON.stringify(auditLogInput.targets) : "",
metadata: auditLogInput.metadata
? JSON.stringify(auditLogInput.metadata)
: "",
- ip_address: ipAddress || "",
- user_agent: userAgent || "",
+ ip_address: ipAddress ?? "",
+ user_agent: userAgent ?? "",
};
};