diff options
author | Joram Wilander <jwawilander@gmail.com> | 2017-05-10 09:49:16 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-05-10 09:49:16 -0400 |
commit | 2b7e71e47a0679396e64993b49c6d7c3d4321030 (patch) | |
tree | 2665185c257b69f2c28c1a8ae7c85923821a039c /webapp | |
parent | 74b51d1f27b7c78048ad0a92747260d77a1131d1 (diff) | |
download | chat-2b7e71e47a0679396e64993b49c6d7c3d4321030.tar.gz chat-2b7e71e47a0679396e64993b49c6d7c3d4321030.tar.bz2 chat-2b7e71e47a0679396e64993b49c6d7c3d4321030.zip |
Fix JS error when deleting post that has comments (#6381)
Diffstat (limited to 'webapp')
-rw-r--r-- | webapp/components/rhs_thread.jsx | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/webapp/components/rhs_thread.jsx b/webapp/components/rhs_thread.jsx index da958d9d5..1b4eb720f 100644 --- a/webapp/components/rhs_thread.jsx +++ b/webapp/components/rhs_thread.jsx @@ -324,8 +324,6 @@ export default class RhsThread extends React.Component { const postsArray = this.state.postsArray; const selected = this.state.selected; const profiles = this.state.profiles || {}; - const rootPostDay = Utils.getDateForUnixTicks(selected.create_at); - let previousPostDay = rootPostDay; if (postsArray == null || selected == null) { return ( @@ -333,6 +331,9 @@ export default class RhsThread extends React.Component { ); } + const rootPostDay = Utils.getDateForUnixTicks(selected.create_at); + let previousPostDay = rootPostDay; + let profile; if (UserStore.getCurrentId() === selected.user_id) { profile = this.props.currentUser; |