mirror of
https://github.com/flarum/core.git
synced 2025-08-04 23:47:32 +02:00
chore: render after first post items once
This commit is contained in:
@@ -84,11 +84,13 @@ export default class PostStream extends Component {
|
||||
</div>
|
||||
);
|
||||
|
||||
if (post && post.id() === this.discussion.data.relationships.firstPost?.data.id && this.afterFirstPostItems().toArray().length > 0) {
|
||||
const afterPostItems = post && post.id() === this.discussion.data.relationships.firstPost?.data.id ? this.afterFirstPostItems().toArray() : [];
|
||||
|
||||
if (afterPostItems.length > 0) {
|
||||
return m.fragment({ ...attrs }, [
|
||||
postStreamElement,
|
||||
<div className="PostStream-item PostStream-afterFirstPost" key="afterFirstPost">
|
||||
{this.afterFirstPostItems().toArray()}
|
||||
{afterPostItems}
|
||||
</div>,
|
||||
]);
|
||||
}
|
||||
|
Reference in New Issue
Block a user