From 0c2bf2f5a2ce16933d2cb4391eaab3258827a68b Mon Sep 17 00:00:00 2001 From: James Railton Date: Sun, 12 Apr 2015 18:49:33 -0700 Subject: [PATCH] Fix broken dead-code-removal case. The "test" local variable was removed with path work. The last dead-code-removal check used this var. By reintroducing the local var, the unknown variable reference is fixed. --- .../transformation/transformers/utility/dead-code-elimination.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/babel/transformation/transformers/utility/dead-code-elimination.js b/src/babel/transformation/transformers/utility/dead-code-elimination.js index 7f2ed39086..d1ab736f5c 100644 --- a/src/babel/transformation/transformers/utility/dead-code-elimination.js +++ b/src/babel/transformation/transformers/utility/dead-code-elimination.js @@ -34,6 +34,7 @@ export var IfStatement = { exit(node, parent, scope) { var consequent = node.consequent; var alternate = node.alternate; + var test = node.test; var evaluateTest = this.get("test").evaluateTruthy();