File tree Expand file tree Collapse file tree 1 file changed +4
-8
lines changed
Expand file tree Collapse file tree 1 file changed +4
-8
lines changed Original file line number Diff line number Diff line change @@ -1327,10 +1327,10 @@ class AtRule extends CSSParserRule {
13271327 return s ;
13281328 }
13291329 s += "{\n" ;
1330- if ( this . declarations ) {
1330+ if ( this . declarations . length ) {
13311331 s += this . declarations . map ( x => x . toSource ( indent + 1 ) ) . join ( "\n" ) + "\n" ;
13321332 }
1333- if ( this . rules ) {
1333+ if ( this . rules . length ) {
13341334 s += this . rules . map ( x => x . toSource ( indent + 1 ) ) . join ( "\n" ) + "\n" ;
13351335 }
13361336 s += printIndent ( indent ) + "}" ;
@@ -1357,15 +1357,11 @@ class QualifiedRule extends CSSParserRule {
13571357 toSource ( indent = 0 ) {
13581358 let s = printIndent ( indent ) ;
13591359 s += this . prelude . map ( x => x . toSource ( ) ) . join ( "" ) ;
1360- if ( this . declarations == null ) {
1361- s += ";\n" ;
1362- return s ;
1363- }
13641360 s += "{\n" ;
1365- if ( this . declarations ) {
1361+ if ( this . declarations . length ; ) {
13661362 s += this . declarations . map ( x => x . toSource ( indent + 1 ) ) . join ( "\n" ) + "\n" ;
13671363 }
1368- if ( this . rules ) {
1364+ if ( this . rules . length ) {
13691365 s += this . rules . map ( x => x . toSource ( indent + 1 ) ) . join ( "\n" ) + "\n" ;
13701366 }
13711367 s += printIndent ( indent ) + "}" ;
You can’t perform that action at this time.
0 commit comments