diff options
author | Anthony Van de Gejuchte <anthonyvdgent@gmail.com> | 2016-06-12 17:34:05 +0200 |
---|---|---|
committer | Richard van Velzen <rvanvelzen@experty.com> | 2016-06-12 20:03:48 +0200 |
commit | 5c4cfaa0a75317582c979f9b50c1e562fbcfa40d (patch) | |
tree | a070bfffc9db51dc90e45fd2d0319c7b44db26cc /lib | |
parent | bb9c9707aa6b4c625ad985798aea879080411ce1 (diff) | |
download | tracifyjs-5c4cfaa0a75317582c979f9b50c1e562fbcfa40d.tar.gz tracifyjs-5c4cfaa0a75317582c979f9b50c1e562fbcfa40d.zip |
Re-add parens after new expression in beautify mode
Diffstat (limited to 'lib')
-rw-r--r-- | lib/output.js | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/output.js b/lib/output.js index 7ddee484..6eae2f1f 100644 --- a/lib/output.js +++ b/lib/output.js @@ -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) { |