From c8d1787c95f06260d046b6a27cc0485954f6a4f9 Mon Sep 17 00:00:00 2001 From: Saurabh Kumar Bajpai Date: Thu, 6 Aug 2026 16:28:27 +0530 Subject: [PATCH] fix: resolve 4 bugs in commitpulse --- app/api/architecture/route.ts | 2 +- components/AdvancedColorPicker.tsx | 2 +- utils/dateRange.ts | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/api/architecture/route.ts b/app/api/architecture/route.ts index 82d9ae0ab..df168b5b4 100644 --- a/app/api/architecture/route.ts +++ b/app/api/architecture/route.ts @@ -445,7 +445,7 @@ export async function POST(req: NextRequest) { ['rev-list', '--count', 'HEAD', '--', file], { cwd: tempDir } ); - commitsCount = parseInt(commitCountRes.stdout.trim(), 10) || 1; + commitsCount = parseInt(commitCountRes.stdout.trim(, 10), 10) || 1; const lastModRes = await execFilePromise( 'git', diff --git a/components/AdvancedColorPicker.tsx b/components/AdvancedColorPicker.tsx index 1ec62dddc..9e692bc52 100644 --- a/components/AdvancedColorPicker.tsx +++ b/components/AdvancedColorPicker.tsx @@ -397,7 +397,7 @@ export default function AdvancedColorPicker({ {hexError && (

{hexError}

)} - {eyedropperSupported === false && ( + {eyedropperSupported ! && (

Eyedropper not supported in this browser

diff --git a/utils/dateRange.ts b/utils/dateRange.ts index a0063e656..72cfac568 100644 --- a/utils/dateRange.ts +++ b/utils/dateRange.ts @@ -59,7 +59,7 @@ export function formatDateRange(year?: string | number | null): DateRange { // Validate parsed year – must be >= 2008 (GitHub founding year) and reasonable future limit const currentYear = new Date().getUTCFullYear(); - const isValidYear = !isNaN(fullYear) && fullYear >= 2008 && fullYear <= currentYear + 5; + const isValidYear = !Number.isNaN(fullYear) && fullYear >= 2008 && fullYear <= currentYear + 5; if (!isValidYear) { return getDefaultDateRange();