This commit is contained in:
Dennis Shtatnov 2018-01-04 15:38:41 +00:00 committed by GitHub
commit 1c44b53874

View File

@ -114,7 +114,8 @@ function mangle_properties(ast, options) {
if (cache == null) {
cache = {
cname: -1,
props: new Dictionary()
props: new Dictionary(),
props_inv: new Dictionary()
};
}
@ -214,10 +215,11 @@ function mangle_properties(ast, options) {
if (!mangled) {
do {
mangled = base54(++cache.cname);
} while (!can_mangle(mangled));
} while (!can_mangle(mangled) || cache.props_inv.get(mangled));
}
cache.props.set(name, mangled);
cache.props_inv.set(mangled, name);
}
return mangled;
}