Properly scope catch identifier when --screw-ie8

Fix #344
This commit is contained in:
Mihai Bazon
2013-11-28 16:43:30 +02:00
parent ea10642572
commit d2190c2bf3
3 changed files with 19 additions and 29 deletions

View File

@@ -1669,10 +1669,10 @@ merge(Compressor.prototype, {
return arg.value;
}).join(",") + "){" + self.args[self.args.length - 1].value + "})()";
var ast = parse(code);
ast.figure_out_scope();
ast.figure_out_scope({ screw_ie8: compressor.option("screw_ie8") });
var comp = new Compressor(compressor.options);
ast = ast.transform(comp);
ast.figure_out_scope();
ast.figure_out_scope({ screw_ie8: compressor.option("screw_ie8") });
ast.mangle_names();
var fun;
try {