Re-add parens after new expression in beautify mode

This commit is contained in:
Anthony Van de Gejuchte
2016-06-12 17:34:05 +02:00
committed by Richard van Velzen
parent bb9c9707aa
commit 5c4cfaa0a7
2 changed files with 55 additions and 11 deletions

View File

@@ -1287,7 +1287,9 @@ function OutputStream(options) {
// self should be AST_New. decide if we want to show parens or not.
function need_constructor_parens(self, output) {
// Always print parentheses with arguments
return self.args.length > 0;
if (self.args.length > 0) return true;
return output.option("beautify");
};
function best_of(a) {