Skip to content

Commit

Permalink
Fix border radius support application of zero values (#28998)
Browse files Browse the repository at this point in the history
  • Loading branch information
aaronrobertshaw authored Mar 3, 2021
1 parent f71fa4e commit 956d556
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions packages/block-editor/src/hooks/border-radius.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,15 +32,19 @@ export function BorderRadiusEdit( props ) {
}

const onChange = ( newRadius ) => {
const newStyle = {
let newStyle = {
...style,
border: {
...style?.border,
radius: newRadius,
},
};

setAttributes( { style: cleanEmptyObject( newStyle ) } );
if ( newRadius === undefined ) {
newStyle = cleanEmptyObject( newStyle );
}

setAttributes( { style: newStyle } );
};

return (
Expand Down

0 comments on commit 956d556

Please sign in to comment.