mirror of
https://github.com/scratchfoundation/scratch-www.git
synced 2025-02-17 00:21:20 -05:00
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.
This commit is contained in:
parent
dba366815d
commit
a47623306b
1 changed files with 1 additions and 2 deletions
|
@ -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,
|
||||
|
@ -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
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue