diff --git a/www/src/components/plugin-searchbar-body.js b/www/src/components/plugin-searchbar-body.js index 046469db879fa..66213439521d2 100644 --- a/www/src/components/plugin-searchbar-body.js +++ b/www/src/components/plugin-searchbar-body.js @@ -174,10 +174,6 @@ injectGlobal` // Search shows a list of "hits", and is a child of the PluginSearchBar component class Search extends Component { - constructor(props, context) { - super(props) - } - render() { return (
)} /> @@ -415,7 +411,8 @@ class PluginSearchBar extends Component { urlToSearch = () => { if (this.props.location.search) { - return this.props.location.search.slice(2) + // ignore this automatically added query parameter + return this.props.location.search.replace(`no-cache=1`, ``).slice(2) } return `` } @@ -426,7 +423,7 @@ class PluginSearchBar extends Component { }) } - onSearchStateChange(searchState) { + onSearchStateChange = searchState => { this.updateHistory(searchState) this.setState({ searchState }) } @@ -439,11 +436,11 @@ class PluginSearchBar extends Component { appId="OFCNCOG2CU" indexName="npm-search" searchState={this.state.searchState} - onSearchStateChange={this.onSearchStateChange.bind(this)} + onSearchStateChange={this.onSearchStateChange} >