From eaa36da76a8a9e4a0a5278bfcccbde0e6b05f804 Mon Sep 17 00:00:00 2001 From: Grant Kinney Date: Fri, 19 Jan 2024 12:15:21 -0600 Subject: [PATCH] Fix font asset download when font faces are installed --- .../global-styles/font-library-modal/font-collection.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/packages/edit-site/src/components/global-styles/font-library-modal/font-collection.js b/packages/edit-site/src/components/global-styles/font-library-modal/font-collection.js index 793ca9c753f337..8c029c92a9ef53 100644 --- a/packages/edit-site/src/components/global-styles/font-library-modal/font-collection.js +++ b/packages/edit-site/src/components/global-styles/font-library-modal/font-collection.js @@ -160,11 +160,10 @@ function FontCollection( { slug } ) { if ( fontFamily?.fontFace ) { await Promise.all( fontFamily.fontFace.map( async ( fontFace ) => { - if ( fontFace.downloadFromUrl ) { + if ( fontFace.src ) { fontFace.file = await downloadFontFaceAsset( - fontFace.downloadFromUrl + fontFace.src ); - delete fontFace.downloadFromUrl; } } ) );