diff --git a/web/react/stores/post_store.jsx b/web/react/stores/post_store.jsx index c76560c259..24b0d0dd0a 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(); }