Skip to content

Commit

Permalink
Fix action dispatching from block component
Browse files Browse the repository at this point in the history
Dispatch only auto-bound when object argument, not function returning object. See also: bindActionCreators
  • Loading branch information
aduth committed Jul 14, 2017
1 parent 1bc60ea commit 0f6a591
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion editor/modes/visual-editor/block.js
Original file line number Diff line number Diff line change
Expand Up @@ -429,7 +429,9 @@ export default connect(
};
},
( dispatch, ownProps ) => ( {
onChange: updateBlockAttributes,
onChange( uid, attributes ) {
dispatch( updateBlockAttributes( uid, attributes ) );
},

onSelect() {
dispatch( {
Expand Down

0 comments on commit 0f6a591

Please sign in to comment.