Skip to content

Commit

Permalink
Update packages/block-library/src/spacer/edit.js
Browse files Browse the repository at this point in the history
check there's no type before using default type

Co-authored-by: Andrew Serong <14988353+andrewserong@users.noreply.github.com>
  • Loading branch information
tellthemachines and andrewserong authored Feb 12, 2024
1 parent ee2340a commit 240209f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/block-library/src/spacer/edit.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 =
Expand Down

0 comments on commit 240209f

Please sign in to comment.