From e256c4a014cdc00bed89c022922fc8c3442bc2a0 Mon Sep 17 00:00:00 2001 From: Belen Curcio Date: Wed, 12 Apr 2017 13:50:56 -0300 Subject: [PATCH] Using Arrays instead of objects for Hooks --- client/coral-plugin-commentbox/CommentBox.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/client/coral-plugin-commentbox/CommentBox.js b/client/coral-plugin-commentbox/CommentBox.js index 299065024..bde684d2c 100644 --- a/client/coral-plugin-commentbox/CommentBox.js +++ b/client/coral-plugin-commentbox/CommentBox.js @@ -3,7 +3,6 @@ import {I18n} from '../coral-framework'; import translations from './translations.json'; import {Button} from 'coral-ui'; import {Slot} from 'coral-framework'; -import merge from 'lodash/merge'; const name = 'coral-plugin-commentbox'; @@ -63,7 +62,7 @@ class CommentBox extends Component { const postedComment = data.createComment.comment; // Execute postSubmit Hooks - this.state.hooks.postSubmit.forEach(hook => hook()); + this.state.hooks.postSubmit.forEach(hook => hook(data)); if (postedComment.status === 'REJECTED') { addNotification('error', lang.t('comment-post-banned-word'));