play nice with propmangle
This commit is contained in:
@@ -90,6 +90,9 @@ function mangle_properties(ast, options) {
|
||||
if (node instanceof AST_ObjectKeyVal) {
|
||||
add(node.key);
|
||||
}
|
||||
else if (node instanceof AST_ObjectSymbol) {
|
||||
add(node.symbol.name);
|
||||
}
|
||||
else if (node instanceof AST_ObjectProperty) {
|
||||
// setter or getter, since KeyVal is handled above
|
||||
add(node.key.name);
|
||||
@@ -111,6 +114,11 @@ function mangle_properties(ast, options) {
|
||||
if (node instanceof AST_ObjectKeyVal) {
|
||||
node.key = mangle(node.key);
|
||||
}
|
||||
else if (node instanceof AST_ObjectSymbol) {
|
||||
if (should_mangle(node.symbol.name)) {
|
||||
node.mangled_key = mangle(node.symbol.name)
|
||||
}
|
||||
}
|
||||
else if (node instanceof AST_ObjectProperty) {
|
||||
// setter or getter
|
||||
node.key.name = mangle(node.key.name);
|
||||
|
||||
Reference in New Issue
Block a user