Skip to content

Commit

Permalink
Set default value
Browse files Browse the repository at this point in the history
  • Loading branch information
Mamaduka committed Dec 25, 2024
1 parent f277621 commit 6f3cc52
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/block-library/src/media-text/edit.js
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,7 @@ function MediaTextResolutionTool( { image, value, onChange } ) {
return (
<ResolutionTool
value={ value }
defaultValue={ DEFAULT_MEDIA_SIZE_SLUG }
options={ imageSizeOptions }
onChange={ onChange }
/>
Expand All @@ -179,12 +180,12 @@ function MediaTextEdit( {
mediaType,
mediaUrl,
mediaWidth,
mediaSizeSlug,
rel,
verticalAlignment,
allowedBlocks,
useFeaturedImage,
} = attributes;
const mediaSizeSlug = attributes.mediaSizeSlug || DEFAULT_MEDIA_SIZE_SLUG;

const [ featuredImage ] = useEntityProp(
'postType',
Expand Down

0 comments on commit 6f3cc52

Please sign in to comment.