Skip to content

Commit

Permalink
1298: Swap least and most compare fns (#1332)
Browse files Browse the repository at this point in the history
Swap least and most compa
re fns for correct ordering
  • Loading branch information
edmondsoun authored Aug 23, 2024
1 parent 4afc1c1 commit b16ee88
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions frontend/src/components/Sort.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ export function produceSortFunction(sortMode: SortMode): (a: TerseScratch, b: Te
case SortMode.LAST_UPDATED: // most recent first
return (a, b) => new Date(b.last_updated).getTime() - new Date(a.last_updated).getTime()
case SortMode.LEAST_MATCHED:
return compareScratchScores
case SortMode.MOST_MATCHED:
return (a, b) => compareScratchScores(b, a)
case SortMode.MOST_MATCHED:
return compareScratchScores
}
}

Expand Down

0 comments on commit b16ee88

Please sign in to comment.