Fixed dead code injection runtime error caused by identifiers conflict

This commit is contained in:
sanex3339
2018-01-16 23:21:16 +03:00
parent be150f7307
commit 87a4638159
3 changed files with 44 additions and 2 deletions
+10
View File
@@ -180,6 +180,16 @@ export class NodeUtils {
throw new ReferenceError('`parentNode` property of given node is `undefined`');
}
/**
* Stage 1: process root block statement node of the slice of AST-tree
*/
if (NodeGuards.isBlockStatementNode(node) && parentNode === node) {
blockScopes.push(node);
}
/**
* Stage 2: process any other nodes
*/
if (
/**
* we can add program node instantly