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/generator/components/GitHubImportModal.tsx b/app/generator/components/GitHubImportModal.tsx index ec58bc087..8d8ea9fb7 100644 --- a/app/generator/components/GitHubImportModal.tsx +++ b/app/generator/components/GitHubImportModal.tsx @@ -284,3 +284,5 @@ export function GitHubImportModal({ isOpen, onClose, onApply }: GitHubImportModa ); } + +.catch(err => console.error("Promise.all failed:", err)); \ No newline at end of file diff --git a/utils/color.ts b/utils/color.ts index 4d8901185..f0259326a 100644 --- a/utils/color.ts +++ b/utils/color.ts @@ -53,7 +53,7 @@ export function rgbToHsl(r: number, g: number, b: number): { h: number; s: numbe break; } } - return { h: Math.round(h * 360), s: Math.round(s * 100), l: Math.round(l * 100) }; + return { h: Math.round(h * 360 + Number.EPSILON), s: Math.round(s * 100), l: Math.round(l * 100) }; } export function hexToHsl(hex: string): { h: number; s: number; l: number } {