diff --git a/packages/block-library/src/gallery/v1/edit.js b/packages/block-library/src/gallery/v1/edit.js index 6a1eb1c631a900..5820fbe0be9487 100644 --- a/packages/block-library/src/gallery/v1/edit.js +++ b/packages/block-library/src/gallery/v1/edit.js @@ -1,8 +1,3 @@ -/** - * External dependencies - */ -import { isEmpty } from 'lodash'; - /** * WordPress dependencies */ @@ -385,7 +380,7 @@ function GalleryEdit( props ) { } const imageSizeOptions = getImagesSizeOptions(); - const shouldShowSizeOptions = hasImages && ! isEmpty( imageSizeOptions ); + const shouldShowSizeOptions = hasImages && imageSizeOptions.length > 0; return ( <> diff --git a/packages/block-library/src/gallery/v1/gallery-image.native.js b/packages/block-library/src/gallery/v1/gallery-image.native.js index 7fa6ab4ab7ea75..b887ca0bbfe04f 100644 --- a/packages/block-library/src/gallery/v1/gallery-image.native.js +++ b/packages/block-library/src/gallery/v1/gallery-image.native.js @@ -7,7 +7,6 @@ import { ScrollView, TouchableWithoutFeedback, } from 'react-native'; -import { isEmpty } from 'lodash'; /** * WordPress dependencies @@ -334,7 +333,7 @@ class GalleryImage extends Component { accessibilityLabelImageContainer() { const { caption, 'aria-label': ariaLabel } = this.props; - return isEmpty( caption ) + return ! caption ? ariaLabel : ariaLabel + '. ' +