Skip to content
This repository has been archived by the owner on Apr 28, 2020. It is now read-only.

Commit

Permalink
Ensure tweets is not empty
Browse files Browse the repository at this point in the history
  • Loading branch information
Kikobeats committed May 17, 2017
1 parent 833594d commit b9b37cf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/fetch.js
Expand Up @@ -88,7 +88,7 @@ function fetchTimeline (params, opts) {
}

// excedeed tweets by date
if (limitDays) {
if (!isEmpty(tweets) && limitDays) {
const olderTweetDate = new Date(last(tweets).created_at)
const diffDays = differenceInDays(info.timestamp, olderTweetDate)

Expand Down

0 comments on commit b9b37cf

Please sign in to comment.