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/app/api/streak/live/route.ts b/app/api/streak/live/route.ts index b7745f720..1f979fb8d 100644 --- a/app/api/streak/live/route.ts +++ b/app/api/streak/live/route.ts @@ -16,7 +16,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/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) {