Skip to content

Commit

Permalink
fixing issue with table sort for neg vals
Browse files Browse the repository at this point in the history
  • Loading branch information
havok2063 committed Sep 3, 2024
1 parent 5e6fe46 commit 972bd3d
Showing 1 changed file with 1 addition and 10 deletions.
11 changes: 1 addition & 10 deletions src/components/CatalogTable.vue
Original file line number Diff line number Diff line change
Expand Up @@ -67,16 +67,7 @@ const sortItems = (itemList, sortBy) => {
const aValue = a[sortBy.key]
const bValue = b[sortBy.key]
let alt = sortDesc ? 1 : -1
let agt = sortDesc ? -1 : 1
if (sortBy.key == 'dec_sdss_id') {
alt = sortDesc ? -1 : 1
agt = sortDesc ? 1 : -1
}
if (aValue < bValue) return alt;
if (aValue > bValue) return agt;
return 0
return sortDesc ? bValue - aValue : aValue - bValue
})
}
Expand Down

0 comments on commit 972bd3d

Please sign in to comment.