fix JS error when deleting RHS root (#6344)
Этот коммит содержится в:
коммит произвёл
George Goldberg
родитель
14b9d7784e
Коммит
431d89f5f6
@@ -321,18 +321,16 @@ export default class RhsThread extends React.Component {
|
||||
}
|
||||
|
||||
render() {
|
||||
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) {
|
||||
if (this.state.postsArray == null || this.state.selected == null) {
|
||||
return (
|
||||
<div/>
|
||||
);
|
||||
}
|
||||
|
||||
const postsArray = this.state.postsArray;
|
||||
const selected = this.state.selected;
|
||||
const profiles = this.state.profiles || {};
|
||||
|
||||
let profile;
|
||||
if (UserStore.getCurrentId() === selected.user_id) {
|
||||
profile = this.props.currentUser;
|
||||
@@ -350,6 +348,9 @@ export default class RhsThread extends React.Component {
|
||||
rootStatus = this.state.statuses[selected.user_id] || 'offline';
|
||||
}
|
||||
|
||||
const rootPostDay = Utils.getDateForUnixTicks(selected.create_at);
|
||||
let previousPostDay = rootPostDay;
|
||||
|
||||
const commentsLists = [];
|
||||
for (let i = 0; i < postsArray.length; i++) {
|
||||
const comPost = postsArray[i];
|
||||
|
||||
Ссылка в новой задаче
Block a user