fixed functionObfuscator runtime regression error

This commit is contained in:
sanex3339
2016-12-24 19:33:16 +03:00
parent fa126e10f4
commit 1271de0b3a
3 changed files with 15 additions and 13 deletions
+2 -6
View File
@@ -102,13 +102,9 @@ export class NodeUtils {
throw new ReferenceError('`parentNode` property of `parentNode` of given node is `undefined`');
}
if (!NodeUtils.nodesWithBlockScope.includes(parentNode.parentNode.type)) {
return NodeUtils.getBlockScopesOfNode(parentNode, blockScopes);
if (NodeUtils.nodesWithBlockScope.includes(parentNode.parentNode.type)) {
blockScopes.push(parentNode);
}
blockScopes.push(parentNode);
return NodeUtils.getBlockScopesOfNode(parentNode, blockScopes);
}
if (!Node.isProgramNode(parentNode)) {