From 240209f5893b1243722823fb23c637978f269805 Mon Sep 17 00:00:00 2001 From: tellthemachines Date: Mon, 12 Feb 2024 16:48:49 +1100 Subject: [PATCH] Update packages/block-library/src/spacer/edit.js check there's no type before using default type Co-authored-by: Andrew Serong <14988353+andrewserong@users.noreply.github.com> --- packages/block-library/src/spacer/edit.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/block-library/src/spacer/edit.js b/packages/block-library/src/spacer/edit.js index d397e0d784eb98..4e00262d412cd2 100644 --- a/packages/block-library/src/spacer/edit.js +++ b/packages/block-library/src/spacer/edit.js @@ -99,7 +99,7 @@ const SpacerEdit = ( { default: { type: defaultType } = {}, } = parentLayout || {}; // Check if the spacer is inside a flex container. - const isFlexLayout = type === 'flex' || defaultType === 'flex'; + const isFlexLayout = type === 'flex' || ( ! type && defaultType === 'flex' ); // If the spacer is inside a flex container, it should either inherit the orientation // of the parent or use the flex default orientation. const inheritedOrientation =