Skip to content

Commit

Permalink
Spacing Sizes: Fix zero size (#52711)
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewserong authored Jul 18, 2023
1 parent 605e718 commit b7f583f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import useSetting from '../../use-setting';

export default function useSpacingSizes() {
const spacingSizes = [
{ name: 0, slug: '0', side: 0 },
{ name: 0, slug: '0', size: 0 },
...( useSetting( 'spacing.spacingSizes' ) || [] ),
];

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ export function getCustomValueFromPreset( value, spacingSizes ) {
*/
export function getPresetValueFromCustomValue( value, spacingSizes ) {
// Return value as-is if it is already a preset;
if ( isValueSpacingPreset( value ) ) {
if ( isValueSpacingPreset( value ) || value === '0' ) {
return value;
}

Expand Down

0 comments on commit b7f583f

Please sign in to comment.