Skip to content

Commit

Permalink
Fix "Load More" on search
Browse files Browse the repository at this point in the history
Concatenating a number with null results in NaN, and when NaN was used as an API query argument, resulted in a 503.
  • Loading branch information
Ray Schamp committed Jan 30, 2018
1 parent 0054424 commit 83db222
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/views/search/search.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ class Search extends React.Component {
}, (err, body) => {
const loadedSoFar = this.state.loaded;
Array.prototype.push.apply(loadedSoFar, body);
const currentOffset = this.state.offset + this.props.loadNumber;
const currentOffset = this.state.offset + this.state.loadNumber;

this.setState({
loaded: loadedSoFar,
Expand Down Expand Up @@ -159,7 +159,6 @@ class Search extends React.Component {
Search.propTypes = {
dispatch: PropTypes.func,
intl: intlShape,
loadNumber: PropTypes.number,
searchTerm: PropTypes.string,
tab: PropTypes.string
};
Expand Down

0 comments on commit 83db222

Please sign in to comment.