Fixing pending post deletion on other clients.

Этот коммит содержится в:
Christopher Speller
2015-11-24 15:05:53 -05:00
родитель 23affc3098
Коммит b1d89e42ff

Просмотреть файл

@@ -399,10 +399,12 @@ class PostStoreClass extends EventEmitter {
Reflect.deleteProperty(postList.posts, pendingPostId); Reflect.deleteProperty(postList.posts, pendingPostId);
const index = postList.order.indexOf(pendingPostId); const index = postList.order.indexOf(pendingPostId);
if (index !== -1) { if (index === -1) {
postList.order.splice(index, 1); return;
} }
postList.order.splice(index, 1);
this.postsInfo[channelId].pendingPosts = postList; this.postsInfo[channelId].pendingPosts = postList;
this.emitChange(); this.emitChange();
} }