Ver código fonte

update selectorText after changing the value

Gildas 7 anos atrás
pai
commit
94255c8f6c
1 arquivos alterados com 2 adições e 1 exclusões
  1. 2 1
      lib/single-file/css-rules-minifier.js

+ 2 - 1
lib/single-file/css-rules-minifier.js

@@ -111,11 +111,12 @@ this.cssMinifier = this.cssMinifier || (() => {
 					const ruleSelectorText = ruleInfo.selectorsText[selectorTextIndex];
 					if (ruleInfo.matchedSelectors.has(ruleSelectorText)) {
 						if (selectorText) {
-							selectorText += ",";
+							selectorText += ", ";
 						}
 						selectorText += ruleSelectorText;
 					}
 				}
+				cssRule.selectorText = selectorText;
 			}
 		}
 		return (selectorText || cssRule.selectorText) + "{" + (styleCssText || cssRule.style.cssText) + "}";