mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-14 21:27:20 +00:00
fix: give content match a lower score (#4499)
This commit is contained in:
@@ -365,8 +365,8 @@ const Command = React.forwardRef<HTMLDivElement, CommandProps>(
|
||||
// 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 => {
|
||||
|
||||
Reference in New Issue
Block a user