Skip to content

Commit

Permalink
Add equality check back to sort function
Browse files Browse the repository at this point in the history
  • Loading branch information
lyndsiWilliams committed Dec 2, 2021
1 parent 8be6346 commit 4904ef1
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -332,6 +332,11 @@ export default class FilterableTable extends PureComponent<
const aValue = this.parseFloatingNums(a[sortBy]);
const bValue = this.parseFloatingNums(b[sortBy]);

// equal items sort equally
if (aValue === bValue) {
return 0;
}

// nulls sort after anything else
if (aValue === null) {
return 1;
Expand Down

0 comments on commit 4904ef1

Please sign in to comment.