Skip to content

Commit

Permalink
Fix font asset download when font faces are installed (#58021)
Browse files Browse the repository at this point in the history
  • Loading branch information
creativecoder committed Jan 22, 2024
1 parent c0e9949 commit 51345f0
Showing 1 changed file with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
} )
);
Expand Down

0 comments on commit 51345f0

Please sign in to comment.