Commit a4762330 authored by Ray Schamp's avatar Ray Schamp

Fix "Load More" on search

Concatenating a number with null results in NaN, and when NaN was used as an API query argument, resulted in a 503.
parent dba36681
...@@ -79,7 +79,7 @@ class Search extends React.Component { ...@@ -79,7 +79,7 @@ class Search extends React.Component {
}, (err, body) => { }, (err, body) => {
const loadedSoFar = this.state.loaded; const loadedSoFar = this.state.loaded;
Array.prototype.push.apply(loadedSoFar, body); Array.prototype.push.apply(loadedSoFar, body);
const currentOffset = this.state.offset + this.props.loadNumber; const currentOffset = this.state.offset + this.state.loadNumber;
this.setState({ this.setState({
loaded: loadedSoFar, loaded: loadedSoFar,
...@@ -159,7 +159,6 @@ class Search extends React.Component { ...@@ -159,7 +159,6 @@ class Search extends React.Component {
Search.propTypes = { Search.propTypes = {
dispatch: PropTypes.func, dispatch: PropTypes.func,
intl: intlShape, intl: intlShape,
loadNumber: PropTypes.number,
searchTerm: PropTypes.string, searchTerm: PropTypes.string,
tab: PropTypes.string tab: PropTypes.string
}; };
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment