Skip to content

Commit

Permalink
chore: do not prioritize tag elements over operations
Browse files Browse the repository at this point in the history
  • Loading branch information
RomanHotsiy committed Mar 5, 2018
1 parent 825162e commit 67e459f
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/components/SearchBox/SearchBox.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -88,10 +88,8 @@ export class SearchBox extends React.PureComponent<SearchBoxProps, SearchBoxStat
item: this.props.getItemById(res.id),
score: res.score,
}));
results.sort(
(a, b) =>
a.item.depth > b.item.depth ? 1 : a.item.depth < b.item.depth ? -1 : b.score - a.score,
);

results.sort((a, b) => b.score - a.score);

return (
<div>
Expand Down

0 comments on commit 67e459f

Please sign in to comment.