diff --git a/packages/block-library/src/search/edit.js b/packages/block-library/src/search/edit.js index bb79bbf087dd1..1a88576965002 100644 --- a/packages/block-library/src/search/edit.js +++ b/packages/block-library/src/search/edit.js @@ -112,13 +112,19 @@ export default function SearchEdit( { ] ); const borderRadius = style?.border?.radius; - const borderProps = useBorderProps( attributes ); + let borderProps = useBorderProps( attributes ); // Check for old deprecated numerical border radius. Done as a separate // check so that a borderRadius style won't overwrite the longhand // per-corner styles. if ( typeof borderRadius === 'number' ) { - borderProps.style.borderRadius = `${ borderRadius }px`; + borderProps = { + ...borderProps, + style: { + ...borderProps.style, + borderRadius: `${ borderRadius }px`, + }, + }; } const colorProps = useColorProps( attributes );