summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristopher Speller <crspeller@gmail.com>2015-11-24 15:14:59 -0500
committerChristopher Speller <crspeller@gmail.com>2015-11-24 15:14:59 -0500
commit4f156257ceb90778aca72d591c1049756ebc18a4 (patch)
treec737e54655753ffc2989ca9dc5899f8f3c0e5bc3
parent23affc3098614b6fe948772c2767f301f3724a26 (diff)
parentb1d89e42ffe68702253e7602173d74c97417d863 (diff)
downloadchat-4f156257ceb90778aca72d591c1049756ebc18a4.tar.gz
chat-4f156257ceb90778aca72d591c1049756ebc18a4.tar.bz2
chat-4f156257ceb90778aca72d591c1049756ebc18a4.zip
Merge pull request #1515 from mattermost/fix-unread
Fixing pending post deletion on other clients.
-rw-r--r--web/react/stores/post_store.jsx6
1 files changed, 4 insertions, 2 deletions
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();
}