From a4317815f73201c65eac0b0af5da37adfc2bd9be Mon Sep 17 00:00:00 2001 From: Chris Parsons Date: Sat, 6 Jun 2026 00:25:23 -0700 Subject: [PATCH] Fix TS error: narrow picksExpiresAt via optional chain guard Co-Authored-By: Claude Sonnet 4.6 --- app/routes/leagues/$leagueId.draft.$seasonId.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/routes/leagues/$leagueId.draft.$seasonId.tsx b/app/routes/leagues/$leagueId.draft.$seasonId.tsx index c00931d..6c740b9 100644 --- a/app/routes/leagues/$leagueId.draft.$seasonId.tsx +++ b/app/routes/leagues/$leagueId.draft.$seasonId.tsx @@ -508,7 +508,7 @@ export default function DraftRoom() { // loaderTimerNow is server-side Date.now() — subtract from server expiresAt to get ms remaining // without skew, then re-anchor to client clock. const active = timers.find((t) => t.picksExpiresAt && t.picksExpiresAt.getTime() > loaderTimerNow); - if (!active) return null; + if (!active?.picksExpiresAt) return null; const secondsRemaining = Math.ceil((active.picksExpiresAt.getTime() - loaderTimerNow) / 1000); return { teamId: active.teamId, expiresAt: Date.now() + secondsRemaining * 1000 }; });