|
|
@@ -78,7 +78,7 @@ this.fontsMinifier = this.fontsMinifier || (() => {
|
|
|
}
|
|
|
});
|
|
|
doc.querySelectorAll("[style]").forEach(element => {
|
|
|
- if (element.style.fontFamily) {
|
|
|
+ if (element.style && element.style.fontFamily) {
|
|
|
const fontFamilyNames = element.style.fontFamily.split(",").map(fontFamilyName => removeQuotes(fontFamilyName));
|
|
|
fontsInfo.used.push(fontFamilyNames);
|
|
|
}
|
|
|
@@ -241,7 +241,7 @@ this.fontsMinifier = this.fontsMinifier || (() => {
|
|
|
return stylesheetContent;
|
|
|
}
|
|
|
|
|
|
- function processFontFaceRule(rule, fontInfo, stats) {
|
|
|
+ function processFontFaceRule(rule, fontInfo, stats) {
|
|
|
const fontTest = (fontSource, format) => !fontSource.src.startsWith(EMPTY_URL_SOURCE) && fontSource.format == format;
|
|
|
let woffFontFound = fontInfo.find(fontSource => fontTest(fontSource, "woff2-variations"));
|
|
|
if (!woffFontFound) {
|