latest.json: last topic from first page appears on the second page as well.

This commit is contained in:
Bianca Nenciu 2017-03-20 18:30:49 +02:00 committed by Robin Ward
parent c5ae648746
commit 06366b5379
1 changed files with 1 additions and 1 deletions

View File

@ -315,7 +315,7 @@ class TopicQuery
if page == 0
(pinned_topics + unpinned_topics)[0...limit] if limit
else
offset = (page * per_page) - pinned_topics.count - 1
offset = (page * per_page) - pinned_topics.count
offset = 0 unless offset > 0
unpinned_topics.offset(offset).to_a
end