mirror of
https://github.com/webodf/WebODF.git
synced 2026-12-01 16:56:05 +01:00
Do not add empty rules.
This commit is contained in:
@@ -73,7 +73,7 @@ function style2css(stylesheet, stylesxmldom) {
|
||||
var i = iter.iterateNext();
|
||||
while (i) {
|
||||
var rule = createRule(i);
|
||||
if (rule && rule.length > 0) {
|
||||
if (rule) {
|
||||
try {
|
||||
stylesheet.insertRule(rule, stylesheet.cssRules.length);
|
||||
} catch (e) {
|
||||
@@ -113,6 +113,9 @@ function style2css(stylesheet, stylesxmldom) {
|
||||
if (properties.length > 0) {
|
||||
rule += getParagraphProperties(properties.item(0));
|
||||
}
|
||||
if (rule.length == 0) {
|
||||
return null;
|
||||
}
|
||||
return selector + '{' + rule + '}';
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user