Skip to content

Commit

Permalink
Fix: Remove alignundefined class from gallery block edit markup (#13192)
Browse files Browse the repository at this point in the history
  • Loading branch information
jorgefilipecosta authored and youknowriad committed Jan 9, 2019
1 parent f8761e7 commit 204f7a0
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion packages/block-library/src/gallery/edit.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
/**
* External Dependencies
*/
import classnames from 'classnames';
import { filter, pick, map, get } from 'lodash';

/**
Expand Down Expand Up @@ -261,7 +262,16 @@ class GalleryEdit extends Component {
</PanelBody>
</InspectorControls>
{ noticeUI }
<ul className={ `${ className } align${ align } columns-${ columns } ${ imageCrop ? 'is-cropped' : '' }` }>
<ul
className={ classnames(
className,
{
[ `align${ align }` ]: align,
[ `columns-${ columns }` ]: columns,
'is-cropped': imageCrop,
}
) }
>
{ dropZone }
{ images.map( ( img, index ) => {
/* translators: %1$d is the order number of the image, %2$d is the total number of images. */
Expand Down

0 comments on commit 204f7a0

Please sign in to comment.