diff --git a/cmdk/src/index.tsx b/cmdk/src/index.tsx index 77b4353..f8cd64f 100644 --- a/cmdk/src/index.tsx +++ b/cmdk/src/index.tsx @@ -380,8 +380,8 @@ const Command = React.forwardRef((props, forwarded // Sort the items getValidItems() .sort((a, b) => { - const valueA = a.getAttribute(VALUE_ATTR) - const valueB = b.getAttribute(VALUE_ATTR) + const valueA = a.getAttribute('id') + const valueB = b.getAttribute('id') return (scores.get(valueB) ?? 0) - (scores.get(valueA) ?? 0) }) .forEach((item) => {