Этот коммит содержится в:
Joram Wilander
2017-06-23 16:21:52 -04:00
коммит произвёл Harrison Healey
родитель a077cae279
Коммит 458d7d0021
2 изменённых файлов: 8 добавлений и 3 удалений

Просмотреть файл

@@ -12,12 +12,13 @@ import {Preferences} from 'utils/constants.jsx';
import Post from './post.jsx';
function mapStateToProps(state, ownProps) {
const detailedPost = ownProps.post;
const detailedPost = ownProps.post || {};
return {
post: getPost(state, detailedPost.id),
lastPostCount: ownProps.lastPostCount,
user: getUser(state, ownProps.post.user_id),
status: getStatusForUserId(state, ownProps.post.user_id),
user: getUser(state, detailedPost.user_id),
status: getStatusForUserId(state, detailedPost.user_id),
currentUser: getCurrentUser(state),
isFirstReply: Boolean(detailedPost.isFirstReply && detailedPost.commentedOnPost),
highlight: detailedPost.highlight,

Просмотреть файл

@@ -370,6 +370,10 @@ export default class PostList extends React.PureComponent {
for (let i = posts.length - 1; i >= 0; i--) {
const post = posts[i];
if (post == null) {
continue;
}
const postCtl = (
<Post
ref={post.id}