From a11f149c5ada814198c2b9715c920511f78a1292 Mon Sep 17 00:00:00 2001 From: Chi Vinh Le Date: Wed, 6 Sep 2017 22:15:57 +0700 Subject: [PATCH] Refactor --- client/talk-plugin-commentbox/CommentBox.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/client/talk-plugin-commentbox/CommentBox.js b/client/talk-plugin-commentbox/CommentBox.js index 6ee2009ee..2c671946a 100644 --- a/client/talk-plugin-commentbox/CommentBox.js +++ b/client/talk-plugin-commentbox/CommentBox.js @@ -54,7 +54,7 @@ class CommentBox extends React.Component { return; } - let comment = { + let input = { asset_id: assetId, parent_id: parentId, body: this.state.body, @@ -62,10 +62,10 @@ class CommentBox extends React.Component { }; // Execute preSubmit Hooks - this.state.hooks.preSubmit.forEach((hook) => hook(comment)); + this.state.hooks.preSubmit.forEach((hook) => hook(input)); this.setState({loadingState: 'loading'}); - postComment(comment, 'comments') + postComment(input, 'comments') .then(({data}) => { this.setState({loadingState: 'success', body: ''}); const postedComment = data.createComment.comment;