Gildas пре 5 година
родитељ
комит
96e1c0c5f1
1 измењених фајлова са 1 додато и 1 уклоњено
  1. 1 1
      lib/single-file/single-file-helper.js

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

@@ -159,8 +159,8 @@ this.singlefile.lib.helper = this.singlefile.lib.helper || (() => {
 		elements.forEach(element => {
 			let elementHidden, elementKept, computedStyle;
 			if (!options.autoSaveExternalSave && (options.removeHiddenElements || options.removeUnusedFonts || options.compressHTML)) {
+				computedStyle = win.getComputedStyle(element);
 				if (element instanceof win.HTMLElement) {
-					computedStyle = win.getComputedStyle(element);
 					if (options.removeHiddenElements) {
 						elementKept = ((ascendantHidden || element.closest("html > head")) && KEPT_TAG_NAMES.includes(element.tagName)) || element.closest("details");
 						if (!elementKept) {