From 878bce8a0e01917c0c7194601e28ce8ea96ad25a Mon Sep 17 00:00:00 2001 From: Nick Cernis Date: Mon, 3 Dec 2018 23:58:01 +0100 Subject: [PATCH] =?UTF-8?q?Fix=20=E2=80=9Calign=20center=E2=80=9D=20button?= =?UTF-8?q?=20to=20add=20data-align=3D"center"=20in=20the=20editor?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Resolves #12306, where clicking the center button on the Latest Posts block previously had no effect on the block markup in the admin area. --- packages/block-library/src/latest-posts/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/block-library/src/latest-posts/index.js b/packages/block-library/src/latest-posts/index.js index fac9809772056a..e1dd91ea70af86 100644 --- a/packages/block-library/src/latest-posts/index.js +++ b/packages/block-library/src/latest-posts/index.js @@ -28,7 +28,7 @@ export const settings = { getEditWrapperProps( attributes ) { const { align } = attributes; - if ( 'left' === align || 'right' === align || 'wide' === align || 'full' === align ) { + if ( [ 'left', 'center', 'right', 'wide', 'full' ].includes( align ) ) { return { 'data-align': align }; } },