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.

fix undefined tag in bulkCreateLinks bug

Steven Tey9347fb22ad07
diff --git a/apps/web/lib/api/links/bulk-create-links.ts b/apps/web/lib/api/links/bulk-create-links.ts
index a72a27bc38..c750be71b5 100644
--- a/apps/web/lib/api/links/bulk-create-links.ts
+++ b/apps/web/lib/api/links/bulk-create-links.ts
@@ -56,7 +56,9 @@ export async function bulkCreateLinks({
combinedTagIds.length > 0 && {
tags: {
createMany: {
- data: combinedTagIds.map((tagId) => ({ tagId })),
+ data: combinedTagIds
+ .filter((tagId) => typeof tagId === "string")
+ .map((tagId) => ({ tagId })),
},
},
}),