mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
FIX: Return next bookmarks page only if it exists (#18139)
It used to return the next URL anyway which lead to an additional request. On the frontend, if the result set was empty, it kept retrying until at least one result was returned. This bug is fixed in this commit too.
This commit is contained in:
@@ -15,6 +15,6 @@ class UserBookmarkListSerializer < ApplicationSerializer
|
||||
end
|
||||
|
||||
def include_more_bookmarks_url?
|
||||
@include_more_bookmarks_url ||= object.bookmarks.size == object.per_page
|
||||
@include_more_bookmarks_url ||= object.has_more
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user