瀏覽代碼

ignore URL formatting errors

Gildas 7 年之前
父節點
當前提交
ca06cca905
共有 1 個文件被更改,包括 6 次插入1 次删除
  1. 6 1
      lib/single-file/modules/css-fonts-alt-minifier.js

+ 6 - 1
lib/single-file/modules/css-fonts-alt-minifier.js

@@ -220,7 +220,12 @@ this.fontsAltMinifier = this.fontsAltMinifier || (() => {
 		const srcDeclaration = ruleData.block.children.filter(node => node.property == "src").tail;
 		if (srcDeclaration) {
 			fontInfo.reverse();
-			srcDeclaration.data.value = cssTree.parse(fontInfo.map(fontSource => fontSource.src).join(","), { context: "value" });
+			try {
+				srcDeclaration.data.value = cssTree.parse(fontInfo.map(fontSource => fontSource.src).join(","), { context: "value" });
+			}
+			catch (error) {
+				// ignored
+			}
 		}
 	}