Fix TS error: narrow picksExpiresAt via optional chain guard
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
a91c108393
commit
a4317815f7
1 changed files with 1 additions and 1 deletions
|
|
@ -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 };
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue