Skip to content

Commit

Permalink
Revert "fix: items sort by not working (#182)"
Browse files Browse the repository at this point in the history
This reverts commit f4049e6.
  • Loading branch information
pacocoursey committed Feb 6, 2024
1 parent 7a94cad commit be9ff15
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cmdk/src/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -380,8 +380,8 @@ const Command = React.forwardRef<HTMLDivElement, CommandProps>((props, forwarded
// Sort the items
getValidItems()
.sort((a, b) => {
const valueA = a.getAttribute('id')
const valueB = b.getAttribute('id')
const valueA = a.getAttribute(VALUE_ATTR)
const valueB = b.getAttribute(VALUE_ATTR)
return (scores.get(valueB) ?? 0) - (scores.get(valueA) ?? 0)
})
.forEach((item) => {
Expand Down

0 comments on commit be9ff15

Please sign in to comment.