Skip to content

Commit

Permalink
refactor(chunk): remove by from chunk calculation
Browse files Browse the repository at this point in the history
we weren't actually using this anymore so kill it with fire
  • Loading branch information
Vince Speelman committed Feb 10, 2018
1 parent bab2fc9 commit 7c50956
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ class ShowMore extends Component {

getItemsChunk = current => items => items.slice(current[0], current[1] + 1);

isLastChunk = by => chunk => {
isLastChunk = chunk => {
const { onEnd } = this.props;
const isLast = chunk[1] >= this.props.items.length - 1;
if (isLast && typeof onEnd === 'function') {
Expand All @@ -45,7 +45,7 @@ class ShowMore extends Component {

const chunk = this.getItemsChunk(current)(items);

const isLastPage = this.isLastChunk(by)(current);
const isLastPage = this.isLastChunk(current);
if (typeof children === "function") {
return children({
current: chunk,
Expand Down

0 comments on commit 7c50956

Please sign in to comment.