mirror of
https://github.com/javascript-obfuscator/javascript-obfuscator
synced 2026-08-09 12:42:29 +00:00
Fixed dead code injection runtime error caused by identifiers conflict
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user