Skip to content

Commit

Permalink
Fix logic error in #58951 (#59101)
Browse files Browse the repository at this point in the history
* fix empty font sizes
* fix logic error

Co-authored-by: matiasbenedetto <[email protected]>
Co-authored-by: scruffian <[email protected]>
  • Loading branch information
3 people authored and youknowriad committed Feb 20, 2024
1 parent 4639a15 commit 4cebe35
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -155,9 +155,7 @@ export default function BorderPanel( {
// Shadow
const shadow = decodeValue( inheritedValue?.shadow );
const shadowPresets = settings?.shadow?.presets ?? {};
const overriddenShadowPresets = shadowPresets
? overrideOrigins( shadowPresets )
: [];
const overriddenShadowPresets = overrideOrigins( shadowPresets ) ?? [];
const setShadow = ( newValue ) => {
const slug = overriddenShadowPresets?.find(
( { shadow: shadowName } ) => shadowName === newValue
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ function useHasTextColumnsControl( settings ) {

function getUniqueFontSizesBySlug( settings ) {
const fontSizes = settings?.typography?.fontSizes ?? {};
const overriddenFontSizes = fontSizes ? overrideOrigins( fontSizes ) : [];
const overriddenFontSizes = overrideOrigins( fontSizes ) ?? [];
const uniqueSizes = [];
for ( const currentSize of overriddenFontSizes ) {
if ( ! uniqueSizes.some( ( { slug } ) => slug === currentSize.slug ) ) {
Expand Down

0 comments on commit 4cebe35

Please sign in to comment.