Skip to content

Commit

Permalink
Editor: Handle case where unavailable siteData is causing WSOD (#30812)
Browse files Browse the repository at this point in the history
  • Loading branch information
WunderBart authored Apr 15, 2021
1 parent 4ab6f3b commit a6c6f10
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ function PostPublishPanelPrepublish( { children } ) {
] ),
siteIconUrl: siteData.site_icon_url,
siteTitle: siteData.name,
siteHome: filterURLForDisplay( siteData.home ),
siteHome: siteData.home && filterURLForDisplay( siteData.home ),
};
}, [] );

Expand Down Expand Up @@ -103,7 +103,9 @@ function PostPublishPanelPrepublish( { children } ) {
<div className="components-site-card">
{ siteIcon }
<div className="components-site-info">
<span className="components-site-name">{ siteTitle }</span>
<span className="components-site-name">
{ siteTitle || __( '(Untitled)' ) }
</span>
<span className="components-site-home">{ siteHome }</span>
</div>
</div>
Expand Down

0 comments on commit a6c6f10

Please sign in to comment.