diff options
Diffstat (limited to 'web/react/components/rhs_thread.jsx')
-rw-r--r-- | web/react/components/rhs_thread.jsx | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/web/react/components/rhs_thread.jsx b/web/react/components/rhs_thread.jsx index 4d770287c..292624846 100644 --- a/web/react/components/rhs_thread.jsx +++ b/web/react/components/rhs_thread.jsx @@ -91,9 +91,11 @@ export default class RhsThread extends React.Component { }); } onPostChange() { - const selected = PostStore.getSelectedPost(); - const posts = PostStore.getSelectedPostThread(); - this.setState({posts, selected}); + if (this.mounted) { + const selected = PostStore.getSelectedPost(); + const posts = PostStore.getSelectedPostThread(); + this.setState({posts, selected}); + } } onUserChange() { const profiles = JSON.parse(JSON.stringify(UserStore.getProfiles())); @@ -185,7 +187,7 @@ export default class RhsThread extends React.Component { <div className='post-right-comments-container'> {postsArray.map(function mapPosts(comPost) { let p; - if (UserStore.getCurrentId() === selected.user_id) { + if (UserStore.getCurrentId() === comPost.user_id) { p = UserStore.getCurrentUser(); } else { p = profiles[comPost.user_id]; |