Skip to content

Commit

Permalink
Fix: Use implicit checks for truthiness
Browse files Browse the repository at this point in the history
Co-authored-by: Andrew Henry <ajhenry@github.com>
  • Loading branch information
ipc103 and ajhenry authored Mar 1, 2024
1 parent d723b96 commit 17298dc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions who-metrics-ui/src/components/RepositoriesTable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -419,8 +419,8 @@ const getComparator = (sortColumn: keyof RepositoryResult): Comparator => {
return (a, b) => {
const first = a[sortColumn].sort()[0]
const second = b[sortColumn].sort()[0]
if (second === undefined) return -1;
if (first === undefined) return 1;
if (!second) return -1;
if (!first) return 1;
return first.toLowerCase().localeCompare(second.toLowerCase())
};

Expand Down

0 comments on commit 17298dc

Please sign in to comment.