Skip to content

Commit a4dfd4e

Browse files
tyxlaMamaduka
andauthored
Search Block: Fix borderRadius mutation (#61794)
Co-authored-by: tyxla <[email protected]> Co-authored-by: Mamaduka <[email protected]>
1 parent 91918ed commit a4dfd4e

File tree

1 file changed

+8
-2
lines changed
  • packages/block-library/src/search

1 file changed

+8
-2
lines changed

packages/block-library/src/search/edit.js

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -112,13 +112,19 @@ export default function SearchEdit( {
112112
] );
113113

114114
const borderRadius = style?.border?.radius;
115-
const borderProps = useBorderProps( attributes );
115+
let borderProps = useBorderProps( attributes );
116116

117117
// Check for old deprecated numerical border radius. Done as a separate
118118
// check so that a borderRadius style won't overwrite the longhand
119119
// per-corner styles.
120120
if ( typeof borderRadius === 'number' ) {
121-
borderProps.style.borderRadius = `${ borderRadius }px`;
121+
borderProps = {
122+
...borderProps,
123+
style: {
124+
...borderProps.style,
125+
borderRadius: `${ borderRadius }px`,
126+
},
127+
};
122128
}
123129

124130
const colorProps = useColorProps( attributes );

0 commit comments

Comments
 (0)