Skip to content

Commit

Permalink
revert ordinal sort direction. correct as is.
Browse files Browse the repository at this point in the history
was not the cause of the bug
  • Loading branch information
buckhalt committed Apr 18, 2024
1 parent 9313048 commit be22e8d
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/utils/createSorter.js
Original file line number Diff line number Diff line change
Expand Up @@ -95,17 +95,17 @@ const hierarchyFunction = ({ property, direction = 'desc', hierarchy = [] }) =>

if (direction === 'asc') {
if (firstIndex > secondIndex) {
return 1;
return -1;
}
if (firstIndex < secondIndex) {
return -1;
return 1;
}
} else {
if (firstIndex < secondIndex) {
return 1;
return -1;
}
if (firstIndex > secondIndex) {
return -1;
return 1;
}
}
return 0;
Expand Down

0 comments on commit be22e8d

Please sign in to comment.