Skip to content

Commit

Permalink
improve conditional template definition
Browse files Browse the repository at this point in the history
  • Loading branch information
aristath committed Jun 22, 2021
1 parent d9df980 commit 50a5bef
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions packages/block-library/src/buttons/edit.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,14 +52,14 @@ function ButtonsEdit( {

const innerBlocksProps = useInnerBlocksProps( blockProps, {
allowedBlocks: ALLOWED_BLOCKS,
template: [
[
'core/button',
preferredStyle
? { className: `is-style-${ preferredStyle }` }
: {},
],
],
template: preferredStyle
? [
[
'core/button',
{ className: `is-style-${ preferredStyle }` },
],
]
: [ [ 'core/button' ] ],
orientation,
__experimentalLayout: LAYOUT,
templateInsertUpdatesSelection: true,
Expand Down

0 comments on commit 50a5bef

Please sign in to comment.