diff --git a/framework/core/js/forum/src/utils/post-stream.js b/framework/core/js/forum/src/utils/post-stream.js index d31dacbe0..9299d1209 100644 --- a/framework/core/js/forum/src/utils/post-stream.js +++ b/framework/core/js/forum/src/utils/post-stream.js @@ -112,10 +112,13 @@ export default class PostStream { }) } + // @todo rename to pushPost addPostToEnd(post) { - var index = this.ids.length - this.ids.push(post.id()) - this.content.push(this.makeItem(index, index, post)) + if (this.ids.indexOf(post.id()) === -1) { + var index = this.ids.length; + this.ids.push(post.id()); + this.content.push(this.makeItem(index, index, post)); + } } removePost(id) {