chore: do not prioritize tag elements over operations

This commit is contained in:
Roman Hotsiy 2018-03-05 17:55:12 +02:00
parent 825162e5d7
commit 67e459f0c7
No known key found for this signature in database
GPG Key ID: 5CB7B3ACABA57CB0

View File

@ -88,10 +88,8 @@ export class SearchBox extends React.PureComponent<SearchBoxProps, SearchBoxStat
item: this.props.getItemById(res.id), item: this.props.getItemById(res.id),
score: res.score, score: res.score,
})); }));
results.sort(
(a, b) => results.sort((a, b) => b.score - a.score);
a.item.depth > b.item.depth ? 1 : a.item.depth < b.item.depth ? -1 : b.score - a.score,
);
return ( return (
<div> <div>