Skip to content

Commit

Permalink
Gallery: Fix stuck image size options loader (#36806)
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewserong committed Nov 24, 2021
1 parent 03dfec3 commit 443d395
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/block-library/src/gallery/edit.js
Expand Up @@ -511,7 +511,7 @@ function GalleryEdit( props ) {
hideCancelButton={ true }
/>
) }
{ Platform.isWeb && ! imageSizeOptions && (
{ Platform.isWeb && ! imageSizeOptions && hasImageIds && (
<BaseControl className={ 'gallery-image-sizes' }>
<BaseControl.VisualLabel>
{ __( 'Image size' ) }
Expand Down
Expand Up @@ -39,7 +39,7 @@ export const updateGallery = ( {
}
const innerBlocks = images.map( ( image ) =>
createBlock( 'core/image', {
id: parseInt( image.id, 10 ),
id: image.id ? parseInt( image.id, 10 ) : null,
url: image.url,
alt: image.alt,
caption: image.caption,
Expand Down

0 comments on commit 443d395

Please sign in to comment.