Skip to content

Commit

Permalink
Prevent duplicate border styles in editor
Browse files Browse the repository at this point in the history
  • Loading branch information
akasunil committed Aug 9, 2024
1 parent 2b487fb commit 1010d00
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
10 changes: 9 additions & 1 deletion packages/block-library/src/tag-cloud/edit.js
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,14 @@ function TagCloudEdit( { attributes, setAttributes } ) {
setAttributes( updateObj );
};

const serverSideAttributes = {
...attributes,
style: {
...attributes?.style,
border: undefined,
},
};

const inspectorControls = (
<InspectorControls>
<PanelBody title={ __( 'Settings' ) }>
Expand Down Expand Up @@ -188,7 +196,7 @@ function TagCloudEdit( { attributes, setAttributes } ) {
<ServerSideRender
skipBlockSupportAttributes
block="core/tag-cloud"
attributes={ attributes }
attributes={ serverSideAttributes }
/>
</Disabled>
</div>
Expand Down
2 changes: 2 additions & 0 deletions packages/block-library/src/tag-cloud/editor.scss
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,6 @@
.wp-block-tag-cloud .wp-block-tag-cloud {
margin: 0;
padding: 0;
border: none;
border-radius: inherit;
}

0 comments on commit 1010d00

Please sign in to comment.