Skip to content

Commit

Permalink
Don't trash existing styles
Browse files Browse the repository at this point in the history
  • Loading branch information
tellthemachines committed Nov 3, 2022
1 parent 160fa2f commit e3532db
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/block-editor/src/hooks/layout.js
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,8 @@ function LayoutPanel( { setAttributes, attributes, name: blockName } ) {
}

function ChildLayoutPanel( { setAttributes, attributes } ) {
const { style: { layout = {} } = {} } = attributes;
const { style = {} } = attributes;
const { layout = {} } = style;
const { selfStretch, flexSize } = layout;

return (
Expand Down Expand Up @@ -311,6 +312,7 @@ function ChildLayoutPanel( { setAttributes, attributes } ) {
onChange={ ( value ) => {
setAttributes( {
style: {
...style,
layout: {
...layout,
flexSize: value,
Expand Down

0 comments on commit e3532db

Please sign in to comment.