diff options
Diffstat (limited to 'lib/output.js')
-rw-r--r-- | lib/output.js | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/output.js b/lib/output.js index 70bd74be..8068648e 100644 --- a/lib/output.js +++ b/lib/output.js @@ -990,7 +990,7 @@ function OutputStream(options) { /* -----[ if ]----- */ function make_then(self, output) { var b = self.body; - if (output.option("braces") && !(b instanceof AST_Const) + if (output.option("braces") && !(b instanceof AST_Const || b instanceof AST_Let) || output.option("ie8") && b instanceof AST_Do) return make_block(b, output); // The squeezer replaces "block"-s that contain only a single @@ -1124,6 +1124,7 @@ function OutputStream(options) { }; } DEFPRINT(AST_Const, print_definitinos("const")); + DEFPRINT(AST_Let, print_definitinos("let")); DEFPRINT(AST_Var, print_definitinos("var")); function parenthesize_for_noin(node, output, noin) { @@ -1381,7 +1382,7 @@ function OutputStream(options) { }); function force_statement(stat, output) { - if (output.option("braces") && !(stat instanceof AST_Const)) { + if (output.option("braces") && !(stat instanceof AST_Const || stat instanceof AST_Let)) { make_block(stat, output); } else if (!stat || stat instanceof AST_EmptyStatement) { output.force_semicolon(); |