From 25d40bc98c71f526c256076f0c21c04bbb4e99e7 Mon Sep 17 00:00:00 2001
From: Joram Wilander <jwawilander@gmail.com>
Date: Wed, 21 Dec 2016 16:41:05 -0500
Subject: PLT-4431 Add post queuing to the webapp (#4800)

* Add post queuing to the webapp

* Add more abstraction
---
 webapp/components/rhs_thread.jsx | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

(limited to 'webapp/components/rhs_thread.jsx')

diff --git a/webapp/components/rhs_thread.jsx b/webapp/components/rhs_thread.jsx
index 658cba288..8fd49dd25 100644
--- a/webapp/components/rhs_thread.jsx
+++ b/webapp/components/rhs_thread.jsx
@@ -332,10 +332,12 @@ export default class RhsThread extends React.Component {
                                         status = this.state.statuses[p.id] || 'offline';
                                     }
 
+                                    const keyPrefix = comPost.id ? comPost.id : comPost.pending_post_id;
+
                                     return (
                                         <Comment
                                             ref={comPost.id}
-                                            key={comPost.id + 'commentKey'}
+                                            key={keyPrefix + 'commentKey'}
                                             post={comPost}
                                             user={p}
                                             currentUser={this.props.currentUser}
-- 
cgit v1.2.3-1-g7c22

