Merge pull request #2907 from phantom10111/some-fixes

Some fixes in babel-traverse
This commit is contained in:
Sebastian McKenzie 2015-11-08 02:34:51 -08:00
commit 4b5b814872
2 changed files with 3 additions and 2 deletions

View File

@ -87,7 +87,7 @@ traverse.clearNode = function (node) {
if (key[0] === "_" && node[key] != null) node[key] = undefined;
}
let syms: Array<Symbol> = Object.getOwnPropertyNames(node);
let syms: Array<Symbol> = Object.getOwnPropertySymbols(node);
for (let sym of syms) {
node[sym] = null;
}

View File

@ -33,7 +33,8 @@ function getCache(node, parentScope, self) {
}
} else if (!node[CACHE_MULTIPLE_KEY]) {
// no scope has ever been associated with this node
return node[CACHE_SINGLE_KEY] = self;
node[CACHE_SINGLE_KEY] = self;
return;
}
// looks like we have either a single scope association that was never matched or