diff --git a/lib/coffee_script/nodes.js b/lib/coffee_script/nodes.js index e19dd48d..401de91d 100644 --- a/lib/coffee_script/nodes.js +++ b/lib/coffee_script/nodes.js @@ -964,7 +964,7 @@ ASSIGNMENT: ['||=', '&&=', '?='], PREFIX_OPERATORS: ['typeof', 'delete'], constructor: function constructor(operator, first, second, flip) { - this.children = [(this.first = first), (this.second = second)]; + this.children = compact([(this.first = first), (this.second = second)]); this.operator = this.CONVERSIONS[operator] || operator; this.flip = !!flip; return this; diff --git a/src/nodes.coffee b/src/nodes.coffee index e00c2452..82424be7 100644 --- a/src/nodes.coffee +++ b/src/nodes.coffee @@ -754,7 +754,7 @@ OpNode: exports.OpNode: inherit Node, { PREFIX_OPERATORS: ['typeof', 'delete'] constructor: (operator, first, second, flip) -> - @children: [@first: first, @second: second] + @children: compact [@first: first, @second: second] @operator: @CONVERSIONS[operator] or operator @flip: !!flip this