Skip to content

Commit

Permalink
Block Editor: Merge block wrapper props by reassignment (#16819)
Browse files Browse the repository at this point in the history
  • Loading branch information
aduth authored Jul 30, 2019
1 parent 6f56a7a commit 87d5d5a
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions packages/block-editor/src/components/block-list/block.js
Original file line number Diff line number Diff line change
Expand Up @@ -412,10 +412,9 @@ function BlockListBlock( {
);

// Determine whether the block has props to apply to the wrapper.
let blockWrapperProps = wrapperProps;
if ( blockType.getEditWrapperProps ) {
blockWrapperProps = {
...blockWrapperProps,
wrapperProps = {
...wrapperProps,
...blockType.getEditWrapperProps( attributes ),
};
}
Expand Down Expand Up @@ -470,7 +469,7 @@ function BlockListBlock( {
aria-label={ blockLabel }
childHandledEvents={ [ 'onDragStart', 'onMouseDown' ] }
tagName={ animated.div }
{ ...blockWrapperProps }
{ ...wrapperProps }
style={
wrapperProps && wrapperProps.style ?
{
Expand Down

0 comments on commit 87d5d5a

Please sign in to comment.