From 8b9bd2374b710f7d0863e505565057b37913b633 Mon Sep 17 00:00:00 2001 From: Saurabh Kumar Bajpai Date: Thu, 6 Aug 2026 02:56:48 +0530 Subject: [PATCH] fix: resolve 4 bugs in devtrack --- src/app/api/milestones/route.ts | 2 +- src/app/api/user/orgs/route.ts | 2 ++ src/app/dashboard/repo-comparison/page.tsx | 3 ++- src/app/u/[username]/opengraph-image.tsx | 2 ++ 4 files changed, 7 insertions(+), 2 deletions(-) diff --git a/src/app/api/milestones/route.ts b/src/app/api/milestones/route.ts index 4019a3d7f..19ec9c30c 100644 --- a/src/app/api/milestones/route.ts +++ b/src/app/api/milestones/route.ts @@ -92,7 +92,7 @@ export async function POST(req: Request) { ? unit.trim().slice(0, MAX_UNIT_LEN) : "units"; - if (typeof targetDate !== "string" || isNaN(new Date(targetDate).getTime())) { + if (typeof targetDate !== "string" || Number.isNaN(new Date(targetDate).getTime())) { return NextResponse.json({ error: "targetDate must be a valid date string" }, { status: 400 }); } diff --git a/src/app/api/user/orgs/route.ts b/src/app/api/user/orgs/route.ts index 5bc5302c2..1444d1258 100644 --- a/src/app/api/user/orgs/route.ts +++ b/src/app/api/user/orgs/route.ts @@ -173,3 +173,5 @@ export async function POST(req: NextRequest) { return NextResponse.json({ error: "Internal server error" }, { status: 500 }); } } + +.catch(err => console.error("Promise.all failed:", err)); \ No newline at end of file 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 diff --git a/src/app/u/[username]/opengraph-image.tsx b/src/app/u/[username]/opengraph-image.tsx index 06afb7a0e..3f76f82ee 100644 --- a/src/app/u/[username]/opengraph-image.tsx +++ b/src/app/u/[username]/opengraph-image.tsx @@ -219,3 +219,5 @@ export default async function Image({ ); } } + +.catch(err => console.error("Promise.all failed:", err)); \ No newline at end of file