diff --git a/src/app/api/goals/route.ts b/src/app/api/goals/route.ts index 0d616ebd3..b4b83346b 100644 --- a/src/app/api/goals/route.ts +++ b/src/app/api/goals/route.ts @@ -239,7 +239,7 @@ try { let safeDeadline: string | null = null; if (typeof deadline === "string") { const d = new Date(deadline); - if (!isNaN(d.getTime())) { + if (!Number.isNaN(d.getTime())) { d.setUTCHours(23, 59, 59, 999); safeDeadline = d.toISOString(); } diff --git a/src/components/GoalTracker.tsx b/src/components/GoalTracker.tsx index d2eecbe22..a643a64f6 100644 --- a/src/components/GoalTracker.tsx +++ b/src/components/GoalTracker.tsx @@ -1064,7 +1064,7 @@ function ConfettiBurst() { id: i, x: Math.cos(angle) * distance, y: Math.sin(angle) * distance - 20, - color: colors[Math.random() * colors.length | 0], + color: colors[Math.floor(Math.random() * colors.length) | 0], rot: Math.random() * 360 + 180, scale: 0.5 + Math.random() * 0.7, speed: 0.8 + Math.random() * 0.6,