Skip to content

Commit 965f86d

Browse files
committed
glayzzle#84 filter out falsy children in blocks
1 parent a99ae87 commit 965f86d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/ast/block.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ var KIND = 'block';
1515
*/
1616
var Block = Statement.extends(function Block(kind, children, location) {
1717
Statement.apply(this, [kind || KIND, location]);
18-
this.children = children;
18+
this.children = children.filter(Boolean);
1919
});
2020

2121
module.exports = Block;

0 commit comments

Comments
 (0)