From 1ad31d0c4ed4b349476d4853afc397f1947530b4 Mon Sep 17 00:00:00 2001 From: Artemio Morales Date: Wed, 27 Sep 2023 06:19:12 -0500 Subject: [PATCH] Image: Ensure `false` values are preserved in memory when defined in `theme.json` (#54639) * Modify conditional when parsing config * Only drop the value if it's undefined. --------- Co-authored-by: Michal Czaplinski --- packages/block-editor/src/components/global-styles/hooks.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/block-editor/src/components/global-styles/hooks.js b/packages/block-editor/src/components/global-styles/hooks.js index 4bbc9c40588e0..356ff4dce57a9 100644 --- a/packages/block-editor/src/components/global-styles/hooks.js +++ b/packages/block-editor/src/components/global-styles/hooks.js @@ -117,7 +117,7 @@ export function useGlobalSetting( propertyPath, blockName, source = 'all' ) { `settings${ appendedBlockPath }.${ setting }` ) ?? getValueFromObjectPath( configToUse, `settings.${ setting }` ); - if ( value ) { + if ( value !== undefined ) { result = setImmutably( result, setting.split( '.' ), value ); } } );