Răsfoiți Sursa

replaced let with const

Gildas 6 ani în urmă
părinte
comite
5466f5a2fd
1 a modificat fișierele cu 1 adăugiri și 2 ștergeri
  1. 1 2
      lib/single-file/single-file-helper.js

+ 1 - 2
lib/single-file/single-file-helper.js

@@ -280,12 +280,11 @@ this.singlefile.lib.helper = this.singlefile.lib.helper || (() => {
 		if (doc) {
 			const contents = [];
 			doc.querySelectorAll("style").forEach((styleElement, styleIndex) => {
-				let stylesheet;
 				try {
 					const tempStyleElement = doc.createElement("style");
 					tempStyleElement.textContent = styleElement.textContent;
 					doc.body.appendChild(tempStyleElement);
-					stylesheet = tempStyleElement.sheet;
+					const stylesheet = tempStyleElement.sheet;
 					tempStyleElement.remove();
 					if (!stylesheet || stylesheet.cssRules.length != styleElement.sheet.cssRules.length) {
 						contents[styleIndex] = Array.from(styleElement.sheet.cssRules).map(cssRule => cssRule.cssText).join("\n");