1
0
mirror of https://github.com/flarum/core.git synced 2025-07-19 07:41:22 +02:00

Don't add duplicate posts to a discussion

This commit is contained in:
Toby Zerner
2015-06-15 08:59:57 +09:30
parent 823027b839
commit 1ff5e06525
2 changed files with 6 additions and 2 deletions

View File

@@ -88,7 +88,7 @@ class PostStream extends mixin(Component, evented) {
stream is not visible.
*/
pushPost(post) {
if (this.visibleEnd >= this.count() - 1) {
if (this.visibleEnd >= this.count() - 1 && this.posts.indexOf(post) === -1) {
this.posts.push(post);
this.visibleEnd++;
}