Fix lint errors: use !== instead of != and toSorted instead of sort

https://claude.ai/code/session_01NdiwK2fbtKhAD3XuD58fTm
This commit is contained in:
Claude 2026-04-13 22:37:30 +00:00
parent 0836dfdaa0
commit 59301bb81d
No known key found for this signature in database
2 changed files with 4 additions and 4 deletions

View file

@ -65,7 +65,7 @@ export function formatAuditDetail(entry: AuditLogEntry): string {
case "draft_reset": {
const prev = d.previousPickNumber;
return prev != null
return prev !== null && prev !== undefined
? `Draft reset (was at pick #${prev})`
: "Draft reset";
}
@ -91,12 +91,12 @@ export function formatAuditDetail(entry: AuditLogEntry): string {
return "Draft started";
case "draft_paused":
return d.pickNumber != null
return d.pickNumber !== null && d.pickNumber !== undefined
? `Draft paused at pick #${d.pickNumber}`
: "Draft paused";
case "draft_resumed":
return d.pickNumber != null
return d.pickNumber !== null && d.pickNumber !== undefined
? `Draft resumed at pick #${d.pickNumber}`
: "Draft resumed";

View file

@ -396,7 +396,7 @@ export async function action(args: Route.ActionArgs) {
// Fetch the new order that was just written so we can log it accurately
const newSlots = await findDraftSlotsBySeasonId(season.id);
const sortedSlots = [...newSlots].sort((a, b) => a.draftOrder - b.draftOrder);
const sortedSlots = newSlots.toSorted((a, b) => a.draftOrder - b.draftOrder);
await logCommissionerAction({
seasonId: season.id,