Skip to content

Commit

Permalink
Fix the site editor loading in multi-site installs (#49861)
Browse files Browse the repository at this point in the history
  • Loading branch information
youknowriad committed Apr 18, 2023
1 parent 05b429c commit 30c5363
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,17 @@ import { store as editSiteStore } from '../../store';
export default function useInitEditedEntityFromURL() {
const { params: { postId, postType } = {} } = useLocation();
const { isRequestingSite, homepageId, url } = useSelect( ( select ) => {
const { getSite } = select( coreDataStore );
const { getSite, getUnstableBase } = select( coreDataStore );
const siteData = getSite();
const base = getUnstableBase();

return {
isRequestingSite: ! siteData,
isRequestingSite: ! base,
homepageId:
siteData?.show_on_front === 'page'
? siteData.page_on_front
: null,
url: siteData?.url,
url: base?.home,
};
}, [] );

Expand Down

0 comments on commit 30c5363

Please sign in to comment.