Skip to content

Commit

Permalink
make sure the image id is an int
Browse files Browse the repository at this point in the history
  • Loading branch information
Glen Davies committed Aug 6, 2021
1 parent 91a04e2 commit 824de6d
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions packages/block-library/src/gallery/transforms.js
Expand Up @@ -59,8 +59,10 @@ function updateThirdPartyTransformToGallery( block ) {
( { url, id, alt } ) => {
return createBlock( 'core/image', {
url,
id,
id: parseInt( id, 10 ),
alt,
sizeSlug: block.attributes.sizeSlug,
linkDestination: block.attributes.linkDestination,
} );
}
);
Expand Down Expand Up @@ -107,7 +109,7 @@ function updateThirdPartyTransformFromGallery( toBlock, fromBlocks ) {
const images = galleryBlock.innerBlocks.map(
( { attributes: { url, id, alt } } ) => ( {
url,
id,
id: parseInt( id, 10 ),
alt,
} )
);
Expand Down

0 comments on commit 824de6d

Please sign in to comment.