mirror of
https://github.com/javascript-obfuscator/javascript-obfuscator
synced 2026-08-09 12:42:29 +00:00
Removed redundant check for cachedReplaceableIdentifiersNamesMap
This commit is contained in:
@@ -136,12 +136,8 @@ export class ClassDeclarationTransformer extends AbstractNodeTransformer {
|
||||
classDeclarationNode: ESTree.ClassDeclaration,
|
||||
blockScopeNode: TNodeWithBlockScope
|
||||
): void {
|
||||
const cachedReplaceableIdentifiersNamesMap: TReplaceableIdentifiersNames | undefined =
|
||||
this.replaceableIdentifiers.get(blockScopeNode);
|
||||
|
||||
if (!cachedReplaceableIdentifiersNamesMap) {
|
||||
return;
|
||||
}
|
||||
const cachedReplaceableIdentifiersNamesMap: TReplaceableIdentifiersNames =
|
||||
this.replaceableIdentifiers.get(blockScopeNode)!;
|
||||
|
||||
const cachedReplaceableIdentifiers: ESTree.Identifier[] | undefined = cachedReplaceableIdentifiersNamesMap
|
||||
.get(classDeclarationNode.id.name);
|
||||
|
||||
@@ -136,12 +136,8 @@ export class FunctionDeclarationTransformer extends AbstractNodeTransformer {
|
||||
functionDeclarationNode: ESTree.FunctionDeclaration,
|
||||
blockScopeNode: TNodeWithBlockScope
|
||||
): void {
|
||||
const cachedReplaceableIdentifiersNamesMap: TReplaceableIdentifiersNames | undefined =
|
||||
this.replaceableIdentifiers.get(blockScopeNode);
|
||||
|
||||
if (!cachedReplaceableIdentifiersNamesMap) {
|
||||
return;
|
||||
}
|
||||
const cachedReplaceableIdentifiersNamesMap: TReplaceableIdentifiersNames =
|
||||
this.replaceableIdentifiers.get(blockScopeNode)!;
|
||||
|
||||
const cachedReplaceableIdentifiers: ESTree.Identifier[] | undefined = cachedReplaceableIdentifiersNamesMap
|
||||
.get(functionDeclarationNode.id.name);
|
||||
|
||||
@@ -145,12 +145,8 @@ export class VariableDeclarationTransformer extends AbstractNodeTransformer {
|
||||
blockScopeNode: TNodeWithBlockScope,
|
||||
scopeNode: ESTree.Node
|
||||
): void {
|
||||
const cachedReplaceableIdentifiersNamesMap: TReplaceableIdentifiersNames | undefined =
|
||||
this.replaceableIdentifiers.get(scopeNode);
|
||||
|
||||
if (!cachedReplaceableIdentifiersNamesMap) {
|
||||
return;
|
||||
}
|
||||
const cachedReplaceableIdentifiersNamesMap: TReplaceableIdentifiersNames =
|
||||
this.replaceableIdentifiers.get(scopeNode)!;
|
||||
|
||||
const identifierNames: string[] = [];
|
||||
|
||||
|
||||
Reference in New Issue
Block a user