From a90c1aeafe0ab94cb20e0f0f40fda2b740a3bb15 Mon Sep 17 00:00:00 2001 From: Mihai Bazon Date: Wed, 7 Nov 2012 11:49:06 +0200 Subject: [PATCH] further fix for parens around New (refs #35) --- lib/output.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/output.js b/lib/output.js index 22ee31e4..2a177684 100644 --- a/lib/output.js +++ b/lib/output.js @@ -475,8 +475,9 @@ function OutputStream(options) { PARENS(AST_New, function(output){ var p = output.parent(); - // (new Date).getTime(); - if (p instanceof AST_Dot && no_constructor_parens(this, output)) + if (no_constructor_parens(this, output) + && (p instanceof AST_Dot // (new Date).getTime() + || p instanceof AST_Call && p.expression === this)) // (new foo)(bar) return true; }); -- 2.34.1