Explorar el Código

make sure documentElement is defined

Gildas hace 5 años
padre
commit
eb73f709ac
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  1. 1 1
      lib/single-file/single-file-helper.js

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

@@ -279,7 +279,7 @@ this.singlefile.lib.helper = this.singlefile.lib.helper || (() => {
 			}
 		}
 		if (element.tagName == "LINK") {
-			if (element.import) {
+			if (element.import && element.import.documentElement) {
 				data.imports.push({ content: serialize(element.import) });
 				element.setAttribute(HTML_IMPORT_ATTRIBUTE_NAME, data.imports.length - 1);
 				data.markedElements.push(element);