aboutsummaryrefslogtreecommitdiff
path: root/lib/scope.js
diff options
context:
space:
mode:
authorAlex Lam S.L <alexlamsl@gmail.com>2017-03-05 13:13:44 +0800
committerGitHub <noreply@github.com>2017-03-05 13:13:44 +0800
commitb70591be1a603d3c1728e6563691c3a192023d3f (patch)
treec7b72062b2418b8423b04047cac152d40def7105 /lib/scope.js
parentb33e7f88e60f886ee3403c82ac2e3fb40caa698f (diff)
downloadtracifyjs-b70591be1a603d3c1728e6563691c3a192023d3f.tar.gz
tracifyjs-b70591be1a603d3c1728e6563691c3a192023d3f.zip
handle variable declaration within catch blocks (#1546)
accounts for IE8- scoping
Diffstat (limited to 'lib/scope.js')
-rw-r--r--lib/scope.js3
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/scope.js b/lib/scope.js
index b00fcb4a..f23c8fe2 100644
--- a/lib/scope.js
+++ b/lib/scope.js
@@ -154,8 +154,7 @@ AST_Toplevel.DEFMETHOD("figure_out_scope", function(options){
}
else if (node instanceof AST_SymbolVar
|| node instanceof AST_SymbolConst) {
- var def = defun.def_variable(node);
- def.init = tw.parent().value;
+ defun.def_variable(node);
}
else if (node instanceof AST_SymbolCatch) {
scope.def_variable(node);