From 582c0c0c9e9b8f64c32db21c6315d17551c1a33a Mon Sep 17 00:00:00 2001 From: David Jay Date: Tue, 6 Dec 2016 12:53:35 -0500 Subject: [PATCH] Handling case where child and parent_id are undefined. --- client/coral-plugin-commentbox/CommentBox.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/client/coral-plugin-commentbox/CommentBox.js b/client/coral-plugin-commentbox/CommentBox.js index b2cc48381..065b1f9e0 100644 --- a/client/coral-plugin-commentbox/CommentBox.js +++ b/client/coral-plugin-commentbox/CommentBox.js @@ -39,7 +39,9 @@ class CommentBox extends Component { related = 'comments'; parent_type = 'assets'; } - updateItem(child_id || parent_id, 'showReply', false, 'comments'); + if (child_id || parent_id) { + updateItem(child_id || parent_id, 'showReply', false, 'comments'); + } postItem(comment, 'comments') .then(({comment_id, status}) => { if (status === 'rejected') {