Return the consequent if the test is truthy.

This commit is contained in:
Brian Donovan
2015-02-12 19:06:06 -08:00
parent ea471a6a17
commit a212f035e4

View File

@@ -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