Skip to content

Commit

Permalink
fix article insertion order in queue
Browse files Browse the repository at this point in the history
  • Loading branch information
naggie committed Apr 13, 2013
1 parent 02b6ea5 commit 372f9ee
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions aggregator/articleQueue.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,8 @@ var internal = function (params) {
if (articles[i].id == article.id)
return false

// add new article to index + 1, so it appears next
articles.splice(i+1,0,article)
// add new article, make it appear next
articles.splice(index+1,0,article)

if (articles.length > max)
articles.pop()
Expand Down

0 comments on commit 372f9ee

Please sign in to comment.