diff --git a/framework/core/js/src/forum/components/PostStream.js b/framework/core/js/src/forum/components/PostStream.js index 9d192d7d6..e3ef7f262 100644 --- a/framework/core/js/src/forum/components/PostStream.js +++ b/framework/core/js/src/forum/components/PostStream.js @@ -84,11 +84,13 @@ export default class PostStream extends Component { ); - 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,
- {this.afterFirstPostItems().toArray()} + {afterPostItems}
, ]); }