skip nested new expressions
This commit is contained in:
@@ -65,7 +65,7 @@ export function NewExpression(node: Object, parent: Object) {
|
||||
if (node.arguments.length === 0 && this.format.compact &&
|
||||
!t.isCallExpression(parent, { callee: node }) &&
|
||||
!t.isMemberExpression(parent) &&
|
||||
!(t.isNewExpression(parent) && parent.arguments.length > 0)) return;
|
||||
!t.isNewExpression(parent)) return;
|
||||
|
||||
this.push("(");
|
||||
this.printList(node.arguments, node);
|
||||
|
||||
@@ -1 +1 @@
|
||||
new X;new Y()();new F().z;new new x;new new x()(a);new new x(a);new new x(a)(a);
|
||||
new X;new Y()();new F().z;new new x();new new x()(a);new new x(a);new new x(a)(a);
|
||||
|
||||
Reference in New Issue
Block a user