Skip to content
Browse files

FIX: Stop loading more if initial topic list less than limit

In cases where the initial topic list is less than 30 and the viewport
is short enough to scroll, an additional set of topics would load. This
commit prevents a load more link from being generated in those
  • Loading branch information...
justindirose committed Nov 8, 2019
1 parent 1a089ad commit a6ac97e69f7c4ff7c9ddabfae77126a1b1b93f99
Showing with 1 addition and 0 deletions.
  1. +1 −0 lib/knowledge_explorer/query.rb
@@ -61,6 +61,7 @@ def list
offset = 0
page_range = @limit
end_of_list = true if results_length < @limit

results = results[offset...page_range]

0 comments on commit a6ac97e

Please sign in to comment.
You can’t perform that action at this time.