From bcb42f9ac6287897f35dad0098c3e33e2a781863 Mon Sep 17 00:00:00 2001 From: Saurabh Kumar Bajpai Date: Thu, 6 Aug 2026 08:07:55 +0530 Subject: [PATCH] fix: resolve 4 bugs in commitpulse --- app/(root)/dashboard/[username]/wrapped/page.tsx | 2 ++ app/api/streak/animated/route.ts | 2 +- app/api/streak/route.ts | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/app/(root)/dashboard/[username]/wrapped/page.tsx b/app/(root)/dashboard/[username]/wrapped/page.tsx index 202be1dfa..d542cd406 100644 --- a/app/(root)/dashboard/[username]/wrapped/page.tsx +++ b/app/(root)/dashboard/[username]/wrapped/page.tsx @@ -55,3 +55,5 @@ export default async function WrappedPage({ ); } + +.catch(err => console.error("Promise.all failed:", err)); \ No newline at end of file diff --git a/app/api/streak/animated/route.ts b/app/api/streak/animated/route.ts index 6640bc464..81de325e7 100644 --- a/app/api/streak/animated/route.ts +++ b/app/api/streak/animated/route.ts @@ -171,7 +171,7 @@ export async function GET(request: Request) { const rawSpeed = searchParams.get('speed'); const speedNum = rawSpeed ? parseFloat(rawSpeed) : 8; const scanSpeed = - !isNaN(speedNum) && isFinite(speedNum) && speedNum >= 1 && speedNum <= 60 ? speedNum : 8; + !Number.isNaN(speedNum) && isFinite(speedNum) && speedNum >= 1 && speedNum <= 60 ? speedNum : 8; // Pre-calculate frame count const totalFrames = Math.max(1, Math.round(duration * fps)); diff --git a/app/api/streak/route.ts b/app/api/streak/route.ts index df37962c8..9a3fc0477 100644 --- a/app/api/streak/route.ts +++ b/app/api/streak/route.ts @@ -388,7 +388,7 @@ export async function GET(request: Request) { grace: Math.max( 0, - Math.min(7, typeof grace === 'number' ? grace : parseInt(String(grace || 1), 10)) + Math.min(7, typeof grace === 'number' ? grace : parseInt(String(grace || 1, 10), 10)) ), mode,