Skip to content

Commit 57f642e

Browse files
authored
Layout: Remove duplicate output of existing classnames in layout classnames (#45499)
1 parent 30a4d86 commit 57f642e

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

packages/block-editor/src/hooks/layout.js

+2-3
Original file line numberDiff line numberDiff line change
@@ -385,8 +385,7 @@ export const withLayoutStyles = createHigherOrderComponent(
385385
}
386386

387387
// Attach a `wp-container-` id-based class name as well as a layout class name such as `is-layout-flex`.
388-
const className = classnames(
389-
props?.className,
388+
const layoutClassNames = classnames(
390389
{
391390
[ `wp-container-${ id }` ]: shouldRenderLayoutStyles && !! css, // Only attach a container class if there is generated CSS to be attached.
392391
},
@@ -410,7 +409,7 @@ export const withLayoutStyles = createHigherOrderComponent(
410409
) }
411410
<BlockListBlock
412411
{ ...props }
413-
__unstableLayoutClassNames={ className }
412+
__unstableLayoutClassNames={ layoutClassNames }
414413
/>
415414
</>
416415
);

0 commit comments

Comments
 (0)