diff --git a/packages/edit-site/src/components/global-styles/font-sizes/font-size.js b/packages/edit-site/src/components/global-styles/font-sizes/font-size.js index 80b1ea55c405b..1ce4c97b91d98 100644 --- a/packages/edit-site/src/components/global-styles/font-sizes/font-size.js +++ b/packages/edit-site/src/components/global-styles/font-sizes/font-size.js @@ -46,6 +46,10 @@ function FontSize() { const [ globalFluid ] = useGlobalSetting( 'typography.fluid' ); + if ( ! origin || ! slug ) { + return; + } + // Get the font sizes from the origin, default to empty array. const sizes = fontSizes[ origin ] ?? [];