fixup! Extend QueryMatcher's sorting heuristic

pull/21833/head
Mike Pennisi 2020-06-18 14:20:40 -04:00
parent 4ffc54d143
commit 2e0cb4746a
1 changed files with 1 additions and 1 deletions

View File

@ -118,7 +118,7 @@ export default class QueryMatcher<T extends Object> {
const index = resultKey.indexOf(query);
if (index !== -1 && (!this._options.shouldMatchPrefix || index === 0)) {
matches.push(
...candidates.map((candidate) => ({key, index, ...candidate}))
...candidates.map((candidate) => ({index, ...candidate}))
);
}
}