Skip to content

Commit

Permalink
Avoid null site access when navigating from site settings to /sites (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
lsl authored Dec 11, 2024
1 parent 1ebd264 commit 511fa7a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions client/my-sites/site-settings/section-general.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@ import { SOURCE_SETTINGS_GENERAL } from './site-tools/utils';

const SiteSettingsGeneral = ( { site, isWPForTeamsSite, isP2Hub, isWpcomStagingSite } ) => (
<div className="site-settings__main general-settings">
<GeneralForm site={ site } />
{ site && <GeneralForm site={ site } /> }
{ isWPForTeamsSite && isP2Hub && <P2PreapprovedDomainsForm siteId={ site?.ID } /> }
{ ! isWpcomStagingSite && ! isEnabled( 'untangling/hosting-menu' ) && (
<SiteTools headerTitle={ translate( 'Site tools' ) } source={ SOURCE_SETTINGS_GENERAL } />
) }
{ isEnabled( 'untangling/hosting-menu' ) && (
{ isEnabled( 'untangling/hosting-menu' ) && site && (
<Notice
showDismiss={ false }
status="is-info"
Expand Down

0 comments on commit 511fa7a

Please sign in to comment.