diff --git a/dist/src/node-groups/DebugProtectionNodesGroup.js b/dist/src/node-groups/DebugProtectionNodesGroup.js index eeef1501..9c2496d2 100644 --- a/dist/src/node-groups/DebugProtectionNodesGroup.js +++ b/dist/src/node-groups/DebugProtectionNodesGroup.js @@ -8,16 +8,8 @@ class DebugProtectionNodesGroup extends NodesGroup_1.NodesGroup { constructor(options = {}) { super(options); this.debugProtectionFunctionIdentifier = Utils_1.Utils.getRandomVariableName(); - this.nodes = new Map([ - [ - 'debugProtectionFunctionNode', - new DebugProtectionFunctionNode_1.DebugProtectionFunctionNode(this.debugProtectionFunctionIdentifier) - ], - [ - 'debugProtectionFunctionCallNode', - new DebugProtectionFunctionCallNode_1.DebugProtectionFunctionCallNode(this.debugProtectionFunctionIdentifier) - ] - ]); + this.nodes.set('debugProtectionFunctionNode', new DebugProtectionFunctionNode_1.DebugProtectionFunctionNode(this.debugProtectionFunctionIdentifier)); + this.nodes.set('debugProtectionFunctionCallNode', new DebugProtectionFunctionCallNode_1.DebugProtectionFunctionCallNode(this.debugProtectionFunctionIdentifier)); if (this.options['debugProtectionInterval']) { this.nodes.set('debugProtectionFunctionIntervalNode', new DebugProtectionFunctionIntervalNode_1.DebugProtectionFunctionIntervalNode(this.debugProtectionFunctionIdentifier)); } diff --git a/dist/src/node-groups/NodesGroup.js b/dist/src/node-groups/NodesGroup.js index cd7576d4..b6edb8b5 100644 --- a/dist/src/node-groups/NodesGroup.js +++ b/dist/src/node-groups/NodesGroup.js @@ -1,6 +1,7 @@ "use strict"; class NodesGroup { constructor(options = {}) { + this.nodes = new Map(); this.options = options; } getNodes() { diff --git a/dist/src/node-groups/UnicodeArrayNodesGroup.js b/dist/src/node-groups/UnicodeArrayNodesGroup.js index 8fde68cb..7ac8d030 100644 --- a/dist/src/node-groups/UnicodeArrayNodesGroup.js +++ b/dist/src/node-groups/UnicodeArrayNodesGroup.js @@ -11,12 +11,7 @@ class UnicodeArrayNodesGroup extends NodesGroup_1.NodesGroup { this.unicodeArrayRotateValue = Utils_1.Utils.getRandomInteger(100, 500); this.unicodeArrayTranslatorName = Utils_1.Utils.getRandomVariableName(UnicodeArrayNode_1.UnicodeArrayNode.UNICODE_ARRAY_RANDOM_LENGTH); let unicodeArrayNode = new UnicodeArrayNode_1.UnicodeArrayNode(this.unicodeArrayName, this.unicodeArrayRotateValue), unicodeArray = unicodeArrayNode.getNodeData(); - this.nodes = new Map([ - [ - 'unicodeArrayNode', - unicodeArrayNode - ] - ]); + this.nodes.set('unicodeArrayNode', unicodeArrayNode); if (this.options['wrapUnicodeArrayCalls']) { this.nodes.set('unicodeArrayCallsWrapper', new UnicodeArrayCallsWrapper_1.UnicodeArrayCallsWrapper(this.unicodeArrayTranslatorName, this.unicodeArrayName, unicodeArray)); } diff --git a/src/node-groups/DebugProtectionNodesGroup.ts b/src/node-groups/DebugProtectionNodesGroup.ts index 63a7550b..a587b316 100644 --- a/src/node-groups/DebugProtectionNodesGroup.ts +++ b/src/node-groups/DebugProtectionNodesGroup.ts @@ -20,16 +20,14 @@ export class DebugProtectionNodesGroup extends NodesGroup { constructor (options: IOptions = {}) { super(options); - this.nodes = new Map ([ - [ - 'debugProtectionFunctionNode', - new DebugProtectionFunctionNode(this.debugProtectionFunctionIdentifier) - ], - [ - 'debugProtectionFunctionCallNode', - new DebugProtectionFunctionCallNode(this.debugProtectionFunctionIdentifier) - ] - ]); + this.nodes.set( + 'debugProtectionFunctionNode', + new DebugProtectionFunctionNode(this.debugProtectionFunctionIdentifier) + ); + this.nodes.set( + 'debugProtectionFunctionCallNode', + new DebugProtectionFunctionCallNode(this.debugProtectionFunctionIdentifier) + ); if (this.options['debugProtectionInterval']) { this.nodes.set( diff --git a/src/node-groups/NodesGroup.ts b/src/node-groups/NodesGroup.ts index 6860974f..bec371ee 100644 --- a/src/node-groups/NodesGroup.ts +++ b/src/node-groups/NodesGroup.ts @@ -7,7 +7,7 @@ export abstract class NodesGroup implements INodesGroup { /** * @type {Map} */ - protected nodes: Map ; + protected nodes: Map = new Map (); /** * @type {IOptions} diff --git a/src/node-groups/UnicodeArrayNodesGroup.ts b/src/node-groups/UnicodeArrayNodesGroup.ts index a821a7bf..dd2dfefb 100644 --- a/src/node-groups/UnicodeArrayNodesGroup.ts +++ b/src/node-groups/UnicodeArrayNodesGroup.ts @@ -35,12 +35,10 @@ export class UnicodeArrayNodesGroup extends NodesGroup { ), unicodeArray: string [] = unicodeArrayNode.getNodeData(); - this.nodes = new Map ([ - [ - 'unicodeArrayNode', - unicodeArrayNode - ] - ]); + this.nodes.set( + 'unicodeArrayNode', + unicodeArrayNode + ); if (this.options['wrapUnicodeArrayCalls']) { this.nodes.set(