Skip to content

Commit

Permalink
fix: use default height when selfStretch is not fit or fill
Browse files Browse the repository at this point in the history
  • Loading branch information
yogeshbhutkar committed Mar 6, 2025
1 parent 997934d commit 9dbe2c9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/block-library/src/spacer/save.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import { useBlockProps, getSpacingPresetCssVar } from '@wordpress/block-editor';

export default function save( { attributes } ) {
const { height, width, style } = attributes;
const { height = DEFAULT_HEIGHT, width, style } = attributes;
const { layout: { selfStretch } = {} } = style || {};
// If selfStretch is set to 'fill' or 'fit', don't set default height.
const finalHeight =
Expand Down

0 comments on commit 9dbe2c9

Please sign in to comment.