diff --git a/packages/block-library/src/site-logo/edit.js b/packages/block-library/src/site-logo/edit.js index c7a97219983f7e..20cbe4ef927d1e 100644 --- a/packages/block-library/src/site-logo/edit.js +++ b/packages/block-library/src/site-logo/edit.js @@ -81,12 +81,12 @@ const SiteLogo = ( { } ); const { imageEditing, maxWidth, title } = useSelect( ( select ) => { const { getSettings } = select( blockEditorStore ); - const siteEntities = select( coreStore ).getEditedEntityRecord( + const siteEntities = select( coreStore ).getEntityRecord( 'root', - 'site' + '__unstableBase' ); return { - title: siteEntities.title, + title: siteEntities?.name, ...pick( getSettings(), [ 'imageEditing', 'maxWidth' ] ), }; }, [] ); @@ -370,12 +370,14 @@ export default function LogoEdit( { } = useSelect( ( select ) => { const { canUser, getEntityRecord, getEditedEntityRecord } = select( coreStore ); - const siteSettings = getEditedEntityRecord( 'root', 'site' ); - const siteData = getEntityRecord( 'root', '__unstableBase' ); - const _siteLogo = siteSettings?.site_logo; - const _readOnlyLogo = siteData?.site_logo; const _canUserEdit = canUser( 'update', 'settings' ); - const _siteLogoId = _canUserEdit ? _siteLogo : _readOnlyLogo; + const siteSettings = _canUserEdit + ? getEditedEntityRecord( 'root', 'site' ) + : undefined; + const siteData = getEntityRecord( 'root', '__unstableBase' ); + const _siteLogoId = _canUserEdit + ? siteSettings?.site_logo + : siteData?.site_logo; const _siteIconId = siteSettings?.site_icon; const mediaItem = _siteLogoId &&