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 link tag updating

Tim Wilson159f7cf3fd07
diff --git a/apps/web/lib/api/links.ts b/apps/web/lib/api/links.ts
index a3fb6849f4..b35852d4c7 100644
--- a/apps/web/lib/api/links.ts
+++ b/apps/web/lib/api/links.ts
@@ -806,7 +806,8 @@ function combineTagIds({
}: {
tagId?: string | null;
tagIds?: string[];
-}) {
- // Using Set to remove duplicates
- return [...new Set((tagIds ?? []).concat(tagId ?? []))];
+}): string[] {
+ // Use tagIds if present, fall back to tagId
+ if (tagIds?.length) return tagIds;
+ return tagId ? [tagId] : [];
}