summaryrefslogtreecommitdiffstats
path: root/webapp
diff options
context:
space:
mode:
authorJoram Wilander <jwawilander@gmail.com>2017-07-07 19:28:18 -0400
committerSaturnino Abril <saturnino.abril@gmail.com>2017-07-08 07:28:18 +0800
commita6ee8bb1ee6763818fcaa482dec5d2e4eb53ae37 (patch)
treee8b0832010353aec3744bd04fa99093eb97e42c8 /webapp
parent06814885a050c9a0cae92c73c48e334272d30281 (diff)
downloadchat-a6ee8bb1ee6763818fcaa482dec5d2e4eb53ae37.tar.gz
chat-a6ee8bb1ee6763818fcaa482dec5d2e4eb53ae37.tar.bz2
chat-a6ee8bb1ee6763818fcaa482dec5d2e4eb53ae37.zip
Fix 'user_id' of undefined JS error (#6878)
Diffstat (limited to 'webapp')
-rw-r--r--webapp/components/post_view/post_body/index.js2
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 {