From b1d89e42ffe68702253e7602173d74c97417d863 Mon Sep 17 00:00:00 2001 From: Christopher Speller Date: Tue, 24 Nov 2015 15:05:53 -0500 Subject: Fixing pending post deletion on other clients. --- web/react/stores/post_store.jsx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'web/react/stores') diff --git a/web/react/stores/post_store.jsx b/web/react/stores/post_store.jsx index c76560c25..24b0d0dd0 100644 --- a/web/react/stores/post_store.jsx +++ b/web/react/stores/post_store.jsx @@ -399,10 +399,12 @@ class PostStoreClass extends EventEmitter { Reflect.deleteProperty(postList.posts, pendingPostId); const index = postList.order.indexOf(pendingPostId); - if (index !== -1) { - postList.order.splice(index, 1); + if (index === -1) { + return; } + postList.order.splice(index, 1); + this.postsInfo[channelId].pendingPosts = postList; this.emitChange(); } -- cgit v1.2.3-1-g7c22