aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMihai Bazon <mihai@bazon.net>2012-10-25 18:52:35 +0300
committerMihai Bazon <mihai@bazon.net>2012-10-25 18:52:35 +0300
commitcb3cafa14d2b65e8100b777d47a0cbade08ad7ca (patch)
tree8f95afec7dfa59bfd0a32d2fd5f79870fe90111d
parent202fb937995086561421719b2b26449757e80913 (diff)
downloadtracifyjs-cb3cafa14d2b65e8100b777d47a0cbade08ad7ca.tar.gz
tracifyjs-cb3cafa14d2b65e8100b777d47a0cbade08ad7ca.zip
cripple scope to make IE happy :-(
close #24
-rw-r--r--lib/scope.js9
1 files changed, 8 insertions, 1 deletions
diff --git a/lib/scope.js b/lib/scope.js
index d87a54d8..910ce5ad 100644
--- a/lib/scope.js
+++ b/lib/scope.js
@@ -115,7 +115,14 @@ AST_Toplevel.DEFMETHOD("figure_out_scope", function(){
node.init_scope_vars();
}
if (node instanceof AST_SymbolLambda) {
- scope.def_function(node);
+ //scope.def_function(node);
+ //
+ // https://github.com/mishoo/UglifyJS2/issues/24 — MSIE
+ // leaks function expression names into the containing
+ // scope. Don't like this fix but seems we can't do any
+ // better. IE: please die. Please!
+ (node.scope = scope.parent_scope).def_function(node);
+
node.init.push(tw.parent());
}
else if (node instanceof AST_SymbolDefun) {