Skip to content

Commit

Permalink
Check if First-Party Mode is enabled before using selector.
Browse files Browse the repository at this point in the history
  • Loading branch information
tofumatt committed Dec 16, 2024
1 parent 504b738 commit e503bd4
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,10 @@ export default function SettingsView() {
);

const isFPMEnabled = useSelect( ( select ) => {
if ( ! fpmEnabled ) {
return false;
}

const { isFirstPartyModeEnabled, isFPMHealthy, isScriptAccessEnabled } =
select( CORE_SITE );

Expand Down

0 comments on commit e503bd4

Please sign in to comment.