Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Gallery: Fix stuck image size options loader
  • Loading branch information
andrewserong committed Nov 24, 2021
commit 455a98a25241412fd219654814ab5976b63a3ff1
2 changes: 1 addition & 1 deletion packages/block-library/src/gallery/edit.js
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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