single-file-core 1.0.12 → 1.0.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -226,9 +226,9 @@ async function processFontFaceRule(ruleData, fontInfo, fontDeclarations, fontTes
226
226
  ]);
227
227
  } catch (error) {
228
228
  const urlNodes = cssTree.findAll(srcDeclaration.data, node => node.type == "Url");
229
- const declarationFontURLs = Array.from(fontDeclarations).find(([node]) => urlNodes.includes(node) && node.value == source.fontUrl)[1];
230
- if (declarationFontURLs.length) {
231
- const fontURL = declarationFontURLs[0];
229
+ const declarationFontURLs = Array.from(fontDeclarations).find(([node]) => urlNodes.includes(node) && node.value == source.fontUrl);
230
+ if (declarationFontURLs && declarationFontURLs[1].length) {
231
+ const fontURL = declarationFontURLs[1][0];
232
232
  if (fontURL) {
233
233
  const fontFace = new FontFace("test-font", "url(" + fontURL + ")");
234
234
  try {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "single-file-core",
3
- "version": "1.0.12",
3
+ "version": "1.0.13",
4
4
  "description": "SingleFile Core",
5
5
  "author": "Gildas Lormeau",
6
6
  "license": "AGPL-3.0-or-later",