Skip to content

Commit

Permalink
Fix bug in autosuggest text box causing review widget to crash (#2573)
Browse files Browse the repository at this point in the history
  • Loading branch information
jake-low authored Feb 20, 2025
1 parent 7b5b0e7 commit 8a009c2
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions src/components/AutosuggestTextBox/AutosuggestTextBox.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import Downshift from "downshift";
import _clone from "lodash/clone";
import _concat from "lodash/concat";
import _difference from "lodash/difference";
import _filter from "lodash/filter";
import _isEmpty from "lodash/isEmpty";
import _map from "lodash/map";
import _split from "lodash/split";
Expand Down Expand Up @@ -207,10 +206,7 @@ export default class AutosuggestTextBox extends Component {
}

// Filter out any of our original preferredResults tags so they don't show in the list twice.
return _filter(
this.props.searchResults,
(t) => this.props.preferredResults.indexOf(t.name) === -1,
);
return this.props.searchResults.filter((t) => !this.props.preferredResults?.contains(t.name));
};

render() {
Expand Down

0 comments on commit 8a009c2

Please sign in to comment.