瀏覽代碼

update selectorText after changing the value

Gildas 7 年之前
父節點
當前提交
94255c8f6c
共有 1 個文件被更改,包括 2 次插入1 次删除
  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];
 					const ruleSelectorText = ruleInfo.selectorsText[selectorTextIndex];
 					if (ruleInfo.matchedSelectors.has(ruleSelectorText)) {
 					if (ruleInfo.matchedSelectors.has(ruleSelectorText)) {
 						if (selectorText) {
 						if (selectorText) {
-							selectorText += ",";
+							selectorText += ", ";
 						}
 						}
 						selectorText += ruleSelectorText;
 						selectorText += ruleSelectorText;
 					}
 					}
 				}
 				}
+				cssRule.selectorText = selectorText;
 			}
 			}
 		}
 		}
 		return (selectorText || cssRule.selectorText) + "{" + (styleCssText || cssRule.style.cssText) + "}";
 		return (selectorText || cssRule.selectorText) + "{" + (styleCssText || cssRule.style.cssText) + "}";