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 domains cron error

Steven Tey65a196a6a287
diff --git a/apps/web/app/api/cron/domains/verify/route.ts b/apps/web/app/api/cron/domains/verify/route.ts
index 63f363844b..0195c15b41 100644
--- a/apps/web/app/api/cron/domains/verify/route.ts
+++ b/apps/web/app/api/cron/domains/verify/route.ts
@@ -67,7 +67,7 @@ export async function GET(req: Request) {
const domains = result.map((domain) => {
return {
...domain,
- clicks: domain.links[0].clicks,
+ clicks: domain.links.length > 0 ? domain.links[0].clicks : 0,
};
});