diff options
author | Mihai Bazon <mihai@bazon.net> | 2012-12-21 11:57:08 +0200 |
---|---|---|
committer | Mihai Bazon <mihai@bazon.net> | 2012-12-21 11:57:08 +0200 |
commit | 08219f0cee9d0be355daa57f873465765d36cd81 (patch) | |
tree | 39528649a6f55265ad8e63b982a4875d57cb23db | |
parent | c4993e1e5cb6ea8ca1f37a6bedf403a67bedbcf6 (diff) | |
download | tracifyjs-08219f0cee9d0be355daa57f873465765d36cd81.tar.gz tracifyjs-08219f0cee9d0be355daa57f873465765d36cd81.zip |
Fix output when semicolons is off.
(need to force a semicolon for the empty body of an `if`)
Close #72
-rw-r--r-- | lib/output.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/output.js b/lib/output.js index ee5e9d9b..464a4593 100644 --- a/lib/output.js +++ b/lib/output.js @@ -728,7 +728,7 @@ function OutputStream(options) { // to the inner IF). This function checks for this case and // adds the block brackets if needed. if (!self.body) - return output.semicolon(); + return output.force_semicolon(); if (self.body instanceof AST_Do && output.option("ie_proof")) { // https://github.com/mishoo/UglifyJS/issues/#issue/57 IE @@ -752,7 +752,7 @@ function OutputStream(options) { } else break; } - self.body.print(output); + force_statement(self.body, output); }; DEFPRINT(AST_If, function(self, output){ output.print("if"); |