Skip to content

A platform for community discussion. Free, open, simple.

FIX: /posts pagination uses ID not created_at (#30990)

Rafael dos Santos Silva5a94ceda542e
diff --git a/app/assets/javascripts/discourse/app/templates/posts.gjs b/app/assets/javascripts/discourse/app/templates/posts.gjs
index abdd0d66d7d..c94537a39cb 100644
--- a/app/assets/javascripts/discourse/app/templates/posts.gjs
+++ b/app/assets/javascripts/discourse/app/templates/posts.gjs
@@ -10,7 +10,7 @@ export default RouteTemplate(
@action
async loadMorePosts() {
const posts = this.args.model;
- const before = posts[posts.length - 1].created_at;
+ const before = posts[posts.length - 1].id;
return Posts.find({ before });
}