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 {
1327
1327
return s ;
1328
1328
}
1329
1329
s += "{\n" ;
1330
- if ( this . declarations ) {
1330
+ if ( this . declarations . length ) {
1331
1331
s += this . declarations . map ( x => x . toSource ( indent + 1 ) ) . join ( "\n" ) + "\n" ;
1332
1332
}
1333
- if ( this . rules ) {
1333
+ if ( this . rules . length ) {
1334
1334
s += this . rules . map ( x => x . toSource ( indent + 1 ) ) . join ( "\n" ) + "\n" ;
1335
1335
}
1336
1336
s += printIndent ( indent ) + "}" ;
@@ -1357,15 +1357,11 @@ class QualifiedRule extends CSSParserRule {
1357
1357
toSource ( indent = 0 ) {
1358
1358
let s = printIndent ( indent ) ;
1359
1359
s += this . prelude . map ( x => x . toSource ( ) ) . join ( "" ) ;
1360
- if ( this . declarations == null ) {
1361
- s += ";\n" ;
1362
- return s ;
1363
- }
1364
1360
s += "{\n" ;
1365
- if ( this . declarations ) {
1361
+ if ( this . declarations . length ; ) {
1366
1362
s += this . declarations . map ( x => x . toSource ( indent + 1 ) ) . join ( "\n" ) + "\n" ;
1367
1363
}
1368
- if ( this . rules ) {
1364
+ if ( this . rules . length ) {
1369
1365
s += this . rules . map ( x => x . toSource ( indent + 1 ) ) . join ( "\n" ) + "\n" ;
1370
1366
}
1371
1367
s += printIndent ( indent ) + "}" ;
You can’t perform that action at this time.
0 commit comments