From b29c612692e2be185cce185b0622c8c201d17e4d Mon Sep 17 00:00:00 2001 From: Saurabh Kumar Bajpai Date: Thu, 6 Aug 2026 14:07:45 +0530 Subject: [PATCH] fix: resolve 4 bugs in commitpulse --- app/achievements/AchievementsClient.tsx | 2 +- app/api/architecture/route.ts | 2 ++ app/api/webhooks/github/route.ts | 2 ++ 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/app/achievements/AchievementsClient.tsx b/app/achievements/AchievementsClient.tsx index 38c35dc8b..53efb8474 100644 --- a/app/achievements/AchievementsClient.tsx +++ b/app/achievements/AchievementsClient.tsx @@ -236,7 +236,7 @@ export function UnlockCelebration({ ); if (!focusable || focusable.length === 0) return; const first = focusable[0]; - const last = focusable[focusable.length - 1]; + const last = focusable.at(-1); if (event.shiftKey && document.activeElement === first) { event.preventDefault(); last.focus(); diff --git a/app/api/architecture/route.ts b/app/api/architecture/route.ts index 82d9ae0ab..21a7bbb19 100644 --- a/app/api/architecture/route.ts +++ b/app/api/architecture/route.ts @@ -737,3 +737,5 @@ export async function POST(req: NextRequest) { decrementClones(ip); } } + +.catch(err => console.error("Promise.all failed:", err)); \ No newline at end of file diff --git a/app/api/webhooks/github/route.ts b/app/api/webhooks/github/route.ts index 865ad6fd1..32983cb72 100644 --- a/app/api/webhooks/github/route.ts +++ b/app/api/webhooks/github/route.ts @@ -135,3 +135,5 @@ export async function POST(req: Request) { return NextResponse.json({ success: true, username, revalidated: true }, { status: 200 }); } + +.catch(err => console.error("Promise.all failed:", err)); \ No newline at end of file