From 6dbcf66f9a682c73f4c0106d0e9c79a0c2d176e0 Mon Sep 17 00:00:00 2001 From: Nikolay Ninarski Date: Wed, 14 Nov 2018 01:30:25 +0200 Subject: [PATCH] Removed unnecessary className attribute after leaving the Additional CSS class empty --- packages/editor/src/hooks/custom-class-name.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/editor/src/hooks/custom-class-name.js b/packages/editor/src/hooks/custom-class-name.js index 9779dfd1a2bb5a..3d4af472276701 100644 --- a/packages/editor/src/hooks/custom-class-name.js +++ b/packages/editor/src/hooks/custom-class-name.js @@ -65,7 +65,7 @@ export const withInspectorControl = createHigherOrderComponent( ( BlockEdit ) => value={ props.attributes.className || '' } onChange={ ( nextValue ) => { props.setAttributes( { - className: nextValue, + className: nextValue !== '' ? nextValue : undefined, } ); } } />