|
|
@@ -77,7 +77,7 @@ this.singlefile.lib.modules.fontsMinifier = this.singlefile.lib.modules.fontsMin
|
|
|
}
|
|
|
return familyName;
|
|
|
}));
|
|
|
- fontsInfo.used = fontsInfo.used.map(fontNames => flatten(fontNames));
|
|
|
+ fontsInfo.used = fontsInfo.used.map(fontNames => singlefile.lib.helper.flatten(fontNames));
|
|
|
}
|
|
|
const variableFound = fontsInfo.used.find(fontNames => fontNames.find(fontName => fontName.startsWith("var(--")));
|
|
|
let unusedFonts, filteredUsedFonts;
|
|
|
@@ -355,8 +355,4 @@ this.singlefile.lib.modules.fontsMinifier = this.singlefile.lib.modules.fontsMin
|
|
|
return FONT_WEIGHTS[weight.toLowerCase()] || weight;
|
|
|
}
|
|
|
|
|
|
- function flatten(array) {
|
|
|
- return array.reduce((a, b) => a.concat(Array.isArray(b) ? flatten(b) : b), []);
|
|
|
- }
|
|
|
-
|
|
|
})();
|