From 0ce22892a9be07b59a6a55f786049302ec7eb666 Mon Sep 17 00:00:00 2001
From: =Corey Hulen <corey@hulen.com>
Date: Thu, 3 Dec 2015 15:17:01 -0800
Subject: PLT-1310 fixing regression caused by this bug

---
 web/react/components/rhs_thread.jsx | 9 +++++++++
 1 file changed, 9 insertions(+)

(limited to 'web/react/components/rhs_thread.jsx')

diff --git a/web/react/components/rhs_thread.jsx b/web/react/components/rhs_thread.jsx
index d111094e7..2edcd8b37 100644
--- a/web/react/components/rhs_thread.jsx
+++ b/web/react/components/rhs_thread.jsx
@@ -101,6 +101,15 @@ export default class RhsThread extends React.Component {
         }
 
         if (currentPosts.posts[currentPosts.order[0]].channel_id === currentSelected.posts[currentSelected.order[0]].channel_id) {
+            for (var key in currentSelected.posts) {
+                if (currentSelected.posts.hasOwnProperty(key)) {
+                    var post = currentSelected.posts[key];
+                    if (post.pending_post_id) {
+                        Reflect.deleteProperty(currentSelected.posts, key);
+                    }
+                }
+            }
+
             for (var postId in currentPosts.posts) {
                 if (currentPosts.posts.hasOwnProperty(postId)) {
                     currentSelected.posts[postId] = currentPosts.posts[postId];
-- 
cgit v1.2.3-1-g7c22

