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: satisfy TS when extracting UTM params in bulk update

Cursor Agent4366ce30a1bb
diff --git a/apps/web/lib/api/links/bulk-update-links.ts b/apps/web/lib/api/links/bulk-update-links.ts
index c60208617f..af4227e88e 100644
--- a/apps/web/lib/api/links/bulk-update-links.ts
+++ b/apps/web/lib/api/links/bulk-update-links.ts
@@ -40,9 +40,8 @@ export async function bulkUpdateLinks(
const imageUrlNonce = nanoid(7);
- const { utm_source, utm_medium, utm_campaign, utm_term, utm_content } = url
- ? getParamsFromURL(url)
- : {};
+ const { utm_source, utm_medium, utm_campaign, utm_term, utm_content } =
+ getParamsFromURL(url || "");
// The bulk payload omits link key but not `partnerId`, so an
// update can move links between partners. The former owners are unrecoverable