Skip to content

Commit

Permalink
Fix: Logic error on site editor useSetting. (#32793)
Browse files Browse the repository at this point in the history
  • Loading branch information
jorgefilipecosta authored Jun 18, 2021
1 parent 01f5e38 commit 7d3a8bf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/edit-site/src/components/editor/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ export function useSetting( path, blockName = '' ) {
const topLevelPath = `__experimentalFeatures.${ path }`;
const blockPath = `__experimentalFeatures.blocks.${ blockName }.${ path }`;
const result = get( settings, blockPath ) ?? get( settings, topLevelPath );
if ( PATHS_WITH_MERGE[ path ] ) {
if ( result && PATHS_WITH_MERGE[ path ] ) {
return result.user ?? result.theme ?? result.core;
}
return result;
Expand Down

0 comments on commit 7d3a8bf

Please sign in to comment.