diff --git a/app/api/reviews/route.ts b/app/api/reviews/route.ts index 51c6f2779..cfae4c478 100644 --- a/app/api/reviews/route.ts +++ b/app/api/reviews/route.ts @@ -185,3 +185,5 @@ export async function POST(req: Request) { ); } } + +.catch(err => console.error("Promise.all failed:", err)); \ No newline at end of file diff --git a/components/InteractiveViewer.tsx b/components/InteractiveViewer.tsx index ba6c65a49..590f9c045 100644 --- a/components/InteractiveViewer.tsx +++ b/components/InteractiveViewer.tsx @@ -60,7 +60,7 @@ export const formatDate = (dateStr: string): string => { const year = parseInt(parts[0], 10); const month = parseInt(parts[1], 10); const day = parseInt(parts[2], 10); - if (isNaN(year) || isNaN(month) || isNaN(day)) return dateStr; + if (Number.isNaN(year) || isNaN(month) || isNaN(day)) return dateStr; try { const date = new Date(`${dateStr}T00:00:00Z`); if (isNaN(date.getTime())) return dateStr; 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();