diff options
author | Alex Lam S.L <alexlamsl@gmail.com> | 2018-07-26 16:35:43 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-07-26 16:35:43 +0800 |
commit | 304db15a20551fad9b4ee1a55c1777ea7844416a (patch) | |
tree | 923eafbb42acaf615efc4ce74ec8705c74ce1dda /lib/scope.js | |
parent | 7cf72b8d66ea3a504648f42a2142728d520f3141 (diff) | |
download | tracifyjs-304db15a20551fad9b4ee1a55c1777ea7844416a.tar.gz tracifyjs-304db15a20551fad9b4ee1a55c1777ea7844416a.zip |
fix corner case in `ie8` & `rename` (#3223)
Diffstat (limited to 'lib/scope.js')
-rw-r--r-- | lib/scope.js | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/scope.js b/lib/scope.js index ab207d60..ac7df7df 100644 --- a/lib/scope.js +++ b/lib/scope.js @@ -136,7 +136,8 @@ AST_Toplevel.DEFMETHOD("figure_out_scope", function(options) { // AST_Defun node before getting to its AST_Symbol. (node.scope = defun.parent_scope.resolve()).def_function(node, defun); } else if (node instanceof AST_SymbolLambda) { - defun.def_function(node, node.name == "arguments" ? undefined : defun); + var def = defun.def_function(node, node.name == "arguments" ? undefined : defun); + if (options.ie8) def.defun = defun.parent_scope.resolve(); } else if (node instanceof AST_SymbolVar) { defun.def_variable(node, node.TYPE == "SymbolVar" ? null : undefined); if (defun !== scope) { |