瀏覽代碼

replaced map with forEach

Gildas 7 年之前
父節點
當前提交
4ccba55ed6
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      lib/single-file/single-file-core.js

+ 1 - 1
lib/single-file/single-file-core.js

@@ -952,7 +952,7 @@ this.SingleFileCore = this.SingleFileCore || (() => {
 		}
 
 		resolveStyleAttributeURLs() {
-			Array.from(this.doc.querySelectorAll("[style]")).map(element => {
+			this.doc.querySelectorAll("[style]").forEach(element => {
 				let styleContent = element.getAttribute("style");
 				if (this.options.compressCSS) {
 					styleContent = DOM.compressCSS(styleContent);