diff --git a/lib/subsetFonts.js b/lib/subsetFonts.js index ed7cb749..2209f849 100644 --- a/lib/subsetFonts.js +++ b/lib/subsetFonts.js @@ -579,8 +579,15 @@ async function subsetFonts( const memoizedGetCssRulesByProperty = memoizeSync(getCssRulesByProperty); const htmlAssets = assetGraph.findAssets({ - type: { $in: ['Html', 'Svg'] }, - isInline: false, + $or: [ + { + type: 'Html', + isInline: false, + }, + { + type: 'Svg', + }, + ], }); const traversalRelationQuery = { $or: [ @@ -1071,7 +1078,7 @@ These glyphs are used on your site, but they don't exist in the font you applied const cssRelation = htmlAsset.addRelation( { type: `${htmlAsset.type}Style`, - hrefType: inlineCss ? 'inline' : hrefType, + hrefType: inlineCss || htmlAsset.type === 'Svg' ? 'inline' : hrefType, to: cssAsset, }, 'before',