mirror of
https://github.com/mattermost/mattermost.git
synced 2025-02-25 18:55:24 -06:00
Fix JS error when deleting post that has comments (#6381)
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user