diff --git a/app/api/streak/live/ws/route.ts b/app/api/streak/live/ws/route.ts index 62e28b129..bdd4e2949 100644 --- a/app/api/streak/live/ws/route.ts +++ b/app/api/streak/live/ws/route.ts @@ -26,7 +26,7 @@ export async function GET(request: Request) { let interval = 30; // default 30s if (intervalParam) { const parsed = parseInt(intervalParam, 10); - if (!isNaN(parsed)) { + if (!Number.isNaN(parsed)) { interval = Math.max(30, Math.min(parsed, 300)); } } 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/context/TranslationContext.tsx b/context/TranslationContext.tsx index d23d9549f..5dfaadf39 100644 --- a/context/TranslationContext.tsx +++ b/context/TranslationContext.tsx @@ -59,7 +59,7 @@ const getNestedValue = ( obj: Record | null | undefined, path: string ): string | undefined => { - if (!obj) return undefined; + if (!obj) return; const parts = path.split('.'); let current: unknown = obj; for (const part of parts) { 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 } {