diff --git a/packages/edit-site/src/components/global-styles/font-library-modal/utils/get-intersecting-font-faces.js b/packages/edit-site/src/components/global-styles/font-library-modal/utils/get-intersecting-font-faces.js index a3ffd31db2288..9a65bb6af80d3 100644 --- a/packages/edit-site/src/components/global-styles/font-library-modal/utils/get-intersecting-font-faces.js +++ b/packages/edit-site/src/components/global-styles/font-library-modal/utils/get-intersecting-font-faces.js @@ -37,7 +37,7 @@ export default function getIntersectingFontFaces( incoming, existing ) { if ( existingFont ) { if ( incomingFont?.fontFace ) { - const matchingFaces = incomingFont.fontFace.filter( + const matchingFaces = ( incomingFont.fontFace || [] ).filter( ( face ) => { return ( existingFont?.fontFace || [] ).find( ( f ) => { return ( diff --git a/packages/edit-site/src/components/global-styles/font-library-modal/utils/index.js b/packages/edit-site/src/components/global-styles/font-library-modal/utils/index.js index e3d3393b9b299..0113658ac2238 100644 --- a/packages/edit-site/src/components/global-styles/font-library-modal/utils/index.js +++ b/packages/edit-site/src/components/global-styles/font-library-modal/utils/index.js @@ -138,7 +138,7 @@ export function getPreviewStyle( family ) { if ( family.fontFace ) { //get all the font faces with normal style - const normalFaces = family.fontFace.filter( + const normalFaces = ( family.fontFace || [] ).filter( ( face ) => face.fontStyle.toLowerCase() === 'normal' ); if ( normalFaces.length > 0 ) {