From 9ecbde6bcc3fc3d84b61fc8c2b392eec2e50d793 Mon Sep 17 00:00:00 2001 From: ramonjd Date: Wed, 11 Aug 2021 19:55:36 +1000 Subject: [PATCH] clean empty object when resetting --- packages/block-editor/src/hooks/min-height.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/block-editor/src/hooks/min-height.js b/packages/block-editor/src/hooks/min-height.js index 76531ac05eeeaa..c97faf985b2222 100644 --- a/packages/block-editor/src/hooks/min-height.js +++ b/packages/block-editor/src/hooks/min-height.js @@ -49,13 +49,13 @@ export function resetMinHeight( { attributes = {}, setAttributes } ) { const { style } = attributes; setAttributes( { - style: { + style: cleanEmptyObject( { ...style, dimensions: { ...style?.dimensions, minHeight: undefined, }, - }, + } ), } ); }