From b6257400ecd9c51e664d9b47312eb58cdae83b4c Mon Sep 17 00:00:00 2001 From: Mark McDowall Date: Mon, 25 Mar 2019 23:26:55 -0700 Subject: [PATCH] Fixed: Sorting of search results in series search box Closes #3013 --- .../src/Components/Page/Header/SeriesSearchInput.js | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/frontend/src/Components/Page/Header/SeriesSearchInput.js b/frontend/src/Components/Page/Header/SeriesSearchInput.js index 88be919d5..d6cd8f55c 100644 --- a/frontend/src/Components/Page/Header/SeriesSearchInput.js +++ b/frontend/src/Components/Page/Header/SeriesSearchInput.js @@ -155,16 +155,7 @@ class SeriesSearchInput extends Component { onSuggestionsFetchRequested = ({ value }) => { const fuse = new Fuse(this.props.series, fuseOptions); - const suggestions = fuse.search(value).sort((a, b) => { - if (a.item.sortTitle < b.item.sortTitle) { - return -1; - } - if (a.item.sortTitle > b.item.sortTitle) { - return 1; - } - - return 0; - }); + const suggestions = fuse.search(value); this.setState({ suggestions }); }