mirror of
https://github.com/flarum/core.git
synced 2025-10-24 13:16:08 +02:00
order posts by creation date
This commit is contained in:
committed by
Alexander Skvortsov
parent
7634a766cb
commit
d460aaa3ad
@@ -155,7 +155,7 @@ export default class DiscussionPage extends Page {
|
||||
record.relationships.discussion.data.id === discussionId
|
||||
)
|
||||
.map((record) => app.store.getById('posts', record.id))
|
||||
.sort((a, b) => a.id() - b.id())
|
||||
.sort((a, b) => a.createdAt() - b.createdAt())
|
||||
.slice(0, 20);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user