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.

Update utils.ts

Steven Tey3b523c8eabfe
diff --git a/apps/web/lib/middleware/utils.ts b/apps/web/lib/middleware/utils.ts
index da38c5c6bf..2aed52aa14 100644
--- a/apps/web/lib/middleware/utils.ts
+++ b/apps/web/lib/middleware/utils.ts
@@ -32,7 +32,7 @@ export const getFinalUrl = (target: string, { req }: { req: NextRequest }) => {
const targetUrl = new URL(decodeURIComponent(target));
// @ts-ignore – until https://github.com/microsoft/TypeScript/issues/54466 is fixed
- if (searchParams.size === 0) return targetUrl.toString(); // if there are no query params, then return the target url as is (no need to parse it
+ if (searchParams.size === 0) return targetUrl.toString(); // if there are no query params, then return the target url as is (no need to parse it)
// if searchParams (type: `URLSearchParams`) has the same key as target url, then overwrite it
for (const [key, value] of searchParams) {