Skip to content
Prev Previous commit
Next Next commit
Prevent empty string being saved to border attributes
  • Loading branch information
aaronrobertshaw committed Jun 7, 2021
commit e6c1fcb3ba8ec36b42855f5419019f73c68aac7c
2 changes: 1 addition & 1 deletion packages/block-editor/src/hooks/border-radius.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ export function BorderRadiusEdit( props ) {
},
};

if ( newRadius === undefined ) {
if ( newRadius === undefined || newRadius === '' ) {
newStyle = cleanEmptyObject( newStyle );
}

Expand Down
2 changes: 1 addition & 1 deletion packages/block-editor/src/hooks/border-width.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ export const BorderWidthEdit = ( props ) => {
},
};

if ( newWidth === undefined ) {
if ( newWidth === undefined || newWidth === '' ) {
newStyle = cleanEmptyObject( newStyle );
}

Expand Down