fix mangle name collision across files (#2722)

This commit is contained in:
Alex Lam S.L
2018-01-05 05:08:09 +08:00
committed by GitHub
parent 484e484571
commit afbcebddf6
5 changed files with 87 additions and 33 deletions

View File

@@ -29,7 +29,6 @@ function set_shorthand(name, options, keys) {
function init_cache(cache) {
if (!cache) return;
if (!("cname" in cache)) cache.cname = -1;
if (!("props" in cache)) {
cache.props = new Dictionary();
} else if (!(cache.props instanceof Dictionary)) {
@@ -39,7 +38,6 @@ function init_cache(cache) {
function to_json(cache) {
return {
cname: cache.cname,
props: cache.props.toObject()
};
}