Explorar o código

prevent error when processing a SVG node

Gildas %!s(int64=7) %!d(string=hai) anos
pai
achega
416bb87dd8
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      lib/single-file/css-rules-matcher.js

+ 1 - 1
lib/single-file/css-rules-matcher.js

@@ -131,7 +131,7 @@ this.RulesMatcher = this.RulesMatcher || (() => {
 		if (!elementInfo) {
 			elementInfo = [];
 			const elementStyle = element.style;
-			if (elementStyle.length) {
+			if (elementStyle && elementStyle.length) {
 				elementInfo.push({ cssStyle: elementStyle });
 			}
 			mediaInfo.elements.set(element, elementInfo);