Use the before visitor in mangle props

(works around a bug in our tree walker which, while cloning nodes, breaks
references between labeled statements and break/continue labels)
This commit is contained in:
Mihai Bazon
2015-04-10 11:33:29 +03:00
parent 5d60484553
commit e04ef56243

View File

@@ -102,7 +102,7 @@ function mangle_properties(ast, options) {
}));
// step 2: transform the tree, renaming properties
return ast.transform(new TreeTransformer(null, function(node){
return ast.transform(new TreeTransformer(function(node){
if (node instanceof AST_ObjectKeyVal) {
if (should_mangle(node.key)) {
node.key = mangle(node.key);