From 0d08bd17b88ddd619d78d695a9b1e2ad9a469448 Mon Sep 17 00:00:00 2001 From: Saurabh Kumar Bajpai Date: Thu, 6 Aug 2026 18:55:21 +0530 Subject: [PATCH] fix: resolve 4 bugs in devtrack --- src/app/api/goals/route.ts | 2 +- src/app/api/metrics/streak/route.ts | 2 +- src/app/dashboard/repo-comparison/page.tsx | 3 ++- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/app/api/goals/route.ts b/src/app/api/goals/route.ts index 0d616ebd3..b4b83346b 100644 --- a/src/app/api/goals/route.ts +++ b/src/app/api/goals/route.ts @@ -239,7 +239,7 @@ try { let safeDeadline: string | null = null; if (typeof deadline === "string") { const d = new Date(deadline); - if (!isNaN(d.getTime())) { + if (!Number.isNaN(d.getTime())) { d.setUTCHours(23, 59, 59, 999); safeDeadline = d.toISOString(); } diff --git a/src/app/api/metrics/streak/route.ts b/src/app/api/metrics/streak/route.ts index f3d1ccb2f..da68afb27 100644 --- a/src/app/api/metrics/streak/route.ts +++ b/src/app/api/metrics/streak/route.ts @@ -137,7 +137,7 @@ async function checkAndRecordMilestone( dispatchToAllWebhooks(userId, "streak.milestone", { streakCount: currentStreak, achievedAt: new Date().toISOString(), - }).catch(() => {}); + }).catch( => console.error()); } } diff --git a/src/app/dashboard/repo-comparison/page.tsx b/src/app/dashboard/repo-comparison/page.tsx index d5a7ca7a7..245da6769 100644 --- a/src/app/dashboard/repo-comparison/page.tsx +++ b/src/app/dashboard/repo-comparison/page.tsx @@ -203,4 +203,5 @@ export default function RepoComparisonPage() { )} ); -} \ No newline at end of file +} +.catch(err => console.error("Promise.all failed:", err)); \ No newline at end of file