summaryrefslogtreecommitdiffstats
path: root/web/react/components/rhs_thread.jsx
diff options
context:
space:
mode:
authorJoramWilander <jwawilander@gmail.com>2016-02-25 14:14:52 -0500
committerJoramWilander <jwawilander@gmail.com>2016-02-25 14:14:52 -0500
commit04f6b0b86cf43ffedd96c59dcce4972831507ce9 (patch)
treea3b174acbe835f2e28fb6ca88ce779f47f08a31f /web/react/components/rhs_thread.jsx
parent493722b8f20178cadce5a2af30680481394040dc (diff)
downloadchat-04f6b0b86cf43ffedd96c59dcce4972831507ce9.tar.gz
chat-04f6b0b86cf43ffedd96c59dcce4972831507ce9.tar.bz2
chat-04f6b0b86cf43ffedd96c59dcce4972831507ce9.zip
Fix deleting threads
Diffstat (limited to 'web/react/components/rhs_thread.jsx')
-rw-r--r--web/react/components/rhs_thread.jsx8
1 files changed, 5 insertions, 3 deletions
diff --git a/web/react/components/rhs_thread.jsx b/web/react/components/rhs_thread.jsx
index 5e782b09b..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()));