Skip to content

Commit 257954d

Browse files
committed
add data-block-style attr when necessary
1 parent dd16fd8 commit 257954d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/components/block-wrapper/index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,8 @@ const BlockWrapper = memo( props => {
4141
// We force-removed the block alignment wrapper div (see src/blocks.js),
4242
// so we need to add our own data-align attribute.
4343
'data-align': align,
44-
// Add data-block-style attribute to replace data-block selectors.
45-
'data-block-style': blockStyle,
44+
// Add data-block-style attribute to replace data-block selectors
45+
...( blockStyle ? { 'data-block-style': blockStyle } : {} ),
4646
} )
4747

4848
// Remove the custom CSS names here because we will be adding it in the BlockDiv component, we need to do this for our current styles to work.

0 commit comments

Comments
 (0)