diff options
author | Joram Wilander <jwawilander@gmail.com> | 2017-07-07 19:28:18 -0400 |
---|---|---|
committer | Saturnino Abril <saturnino.abril@gmail.com> | 2017-07-08 07:28:18 +0800 |
commit | a6ee8bb1ee6763818fcaa482dec5d2e4eb53ae37 (patch) | |
tree | e8b0832010353aec3744bd04fa99093eb97e42c8 /webapp/components/post_view/post_body | |
parent | 06814885a050c9a0cae92c73c48e334272d30281 (diff) | |
download | chat-a6ee8bb1ee6763818fcaa482dec5d2e4eb53ae37.tar.gz chat-a6ee8bb1ee6763818fcaa482dec5d2e4eb53ae37.tar.bz2 chat-a6ee8bb1ee6763818fcaa482dec5d2e4eb53ae37.zip |
Fix 'user_id' of undefined JS error (#6878)
Diffstat (limited to 'webapp/components/post_view/post_body')
-rw-r--r-- | webapp/components/post_view/post_body/index.js | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/webapp/components/post_view/post_body/index.js b/webapp/components/post_view/post_body/index.js index 37cf114b0..90f04e0f9 100644 --- a/webapp/components/post_view/post_body/index.js +++ b/webapp/components/post_view/post_body/index.js @@ -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 { |