Fix 'user_id' of undefined JS error (#6878)

This commit is contained in:
Joram Wilander
2017-07-07 19:28:18 -04:00
committed by Saturnino Abril
parent 06814885a0
commit a6ee8bb1ee

View File

@@ -16,7 +16,7 @@ function mapStateToProps(state, ownProps) {
let parentPostUser;
if (ownProps.post.root_id) {
parentPost = getPost(state, ownProps.post.root_id);
parentPostUser = getUser(state, parentPost.user_id);
parentPostUser = parentPost ? getUser(state, parentPost.user_id) : null;
}
return {