Skip to content

Commit

Permalink
return next page path for ig only when posts exist
Browse files Browse the repository at this point in the history
  • Loading branch information
ifedapoolarewaju committed Jan 12, 2019
1 parent 0d232a1 commit e5a2694
Showing 1 changed file with 3 additions and 1 deletion.
Expand Up @@ -72,5 +72,7 @@ exports.getItemThumbnailUrl = (item) => {
}

exports.getNextPagePath = (items) => {
return `recent?max_id=${exports.getItemId(items[items.length - 1])}`
if (items.length) {
return `recent?max_id=${exports.getItemId(items[items.length - 1])}`
}
}

0 comments on commit e5a2694

Please sign in to comment.