Skip to content

Commit

Permalink
Fallback to site url in the site editor
Browse files Browse the repository at this point in the history
  • Loading branch information
ramonjd committed Apr 19, 2024
1 parent b7e4f3c commit 36dc97b
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions packages/edit-site/src/components/site-hub/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ import { memo } from '@wordpress/element';
import { search, external } from '@wordpress/icons';
import { store as commandsStore } from '@wordpress/commands';
import { displayShortcut } from '@wordpress/keycodes';
import { filterURLForDisplay } from '@wordpress/url';

/**
* Internal dependencies
Expand All @@ -44,13 +45,16 @@ const SiteHub = memo( ( { isTransparent, className } ) => {
getSite,
getUnstableBase, // Site index.
} = select( coreStore );

const _site = getSite();
return {
canvasMode: getCanvasMode(),
dashboardLink:
getSettings().__experimentalDashboardLink || 'index.php',
homeUrl: getUnstableBase()?.home,
siteTitle: getSite()?.title,
siteTitle:
! _site?.title && !! _site?.url
? filterURLForDisplay( _site?.url )
: _site?.title,
};
},
[]
Expand Down

0 comments on commit 36dc97b

Please sign in to comment.