From a212f035e43550a59793804bf7e2b21835fafada Mon Sep 17 00:00:00 2001 From: Brian Donovan Date: Thu, 12 Feb 2015 19:06:06 -0800 Subject: [PATCH] Return the consequent if the test is truthy. --- .../transformers/minification/dead-code-elimination.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/6to5/transformation/transformers/minification/dead-code-elimination.js b/lib/6to5/transformation/transformers/minification/dead-code-elimination.js index eb94292989..5004f5145d 100644 --- a/lib/6to5/transformation/transformers/minification/dead-code-elimination.js +++ b/lib/6to5/transformation/transformers/minification/dead-code-elimination.js @@ -33,7 +33,7 @@ exports.IfStatement = { // if (t.isLiteral(test) && test.value) { - return alternate; + return consequent; } // we can check if a test will be falsy 100% and if so we can inline the