1
0
mirror of https://github.com/flarum/core.git synced 2025-02-25 11:43:19 +01:00

Fix deleting posts causing subsequent posts to display incorrectly

This commit is contained in:
Toby Zerner 2015-06-24 11:46:43 +09:30
parent fee88508ba
commit 3b7c7de83b

View File

@ -160,9 +160,11 @@ class PostStream extends mixin(Component, evented) {
this.posts.map((post, i) => {
var content;
var attributes = {};
attributes['data-index'] = attributes.key = this.visibleStart + i;
attributes['data-index'] = this.visibleStart + i;
if (post) {
attributes.key = 'post'+post.id();
var PostComponent = app.postComponentRegistry[post.contentType()];
content = PostComponent ? PostComponent.component({post}) : '';
attributes.config = fadeIn;
@ -178,6 +180,8 @@ class PostStream extends mixin(Component, evented) {
}
lastTime = post.time();
} else {
attributes.key = this.visibleStart + i;
content = PostLoading.component();
}