Skip to content

Commit

Permalink
fix linting issues
Browse files Browse the repository at this point in the history
  • Loading branch information
Glen Davies committed Dec 11, 2020
1 parent 3f80016 commit 072ce27
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions packages/block-library/src/gallery/edit.js
Original file line number Diff line number Diff line change
Expand Up @@ -122,12 +122,12 @@ function GalleryEdit( props ) {
}, [ currentImageOptions, imageSettings ] );

const { getBlock, getSettings, preferredStyle } = useSelect( ( select ) => {
const settings = select( 'core/block-editor' ).getSettings();
const preferredStyleVariations =
settings.__experimentalPreferredStyleVariations;
const settings = select( 'core/block-editor' ).getSettings();
const preferredStyleVariations =
settings.__experimentalPreferredStyleVariations;
return {
getBlock: select( 'core/block-editor' ).getBlock,
getSettings: select('core/block-editor').getSettings,
getSettings: select( 'core/block-editor' ).getSettings,
preferredStyle: preferredStyleVariations?.value?.[ 'core/image' ],
};
}, [] );
Expand Down Expand Up @@ -212,13 +212,15 @@ function GalleryEdit( props ) {
return {
...pickRelevantMediaFiles( image, sizeSlug ),
...getHrefAndDestination( image, linkTo ),
...getUpdatedLinkTargetSettings(linkTarget, attributes),
className: preferredStyle ? `is-style-${ preferredStyle }` : undefined,
...getUpdatedLinkTargetSettings( linkTarget, attributes ),
className: preferredStyle
? `is-style-${ preferredStyle }`
: undefined,
sizeSlug,
};
}

function onSelectImages(selectedImages, replace = false) {
function onSelectImages( selectedImages, replace = false ) {
const imageArray =
Object.prototype.toString.call( selectedImages ) ===
'[object FileList]'
Expand Down

0 comments on commit 072ce27

Please sign in to comment.