generator: fix NewExpression arguments

This commit is contained in:
Sebastian McKenzie 2014-11-03 11:12:30 +11:00
parent 6838062279
commit 72d924d85b

View File

@ -30,10 +30,9 @@ exports.ConditionalExpression = function (node, print) {
};
exports.NewExpression = function (node, print) {
this.push("new (");
this.push("new ");
print(node.callee);
this.push(")");
if (node.arguments) {
if (node.arguments.length) {
this.push("(");
this.printJoin(print, node.arguments, ", ");
this.push(")");