Skip to content

Commit

Permalink
💡 Fix early return condition when a new feed item is detected
Browse files Browse the repository at this point in the history
  • Loading branch information
re-fort committed Oct 2, 2017
1 parent 5aaa57f commit 2a472ff
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ function setupHeadFeeder() {
})

headFeeder.on('new-item', async function() {
if (headFeeder.list()[0].items.length !== Number(process.env.HEAD_FEED_ITEMS_LENGTH)) return
if (headFeeder.list()[0].items.length < Number(process.env.HEAD_FEED_ITEMS_LENGTH)) return
for (const item of headFeeder.list()[0].items) {
Utility.log('I', `New commit on head repo: ${item.title}`)
let hash = Utility.extractBasename(item.link)
Expand Down

0 comments on commit 2a472ff

Please sign in to comment.