diff --git a/CHANGELOG.md b/CHANGELOG.md index 5048522e..6d72f27a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,7 @@ Change Log v0.9.0-beta.5 --- * Increased performance +* Fixed very rare `Cannot read property 'type' of undefined` error, when `RandomGeneratorUtils.getMathRandom()` returned incorrect value `1`. v0.9.0-beta.4 --- diff --git a/src/Obfuscator.ts b/src/Obfuscator.ts index d3985c22..87bee85d 100644 --- a/src/Obfuscator.ts +++ b/src/Obfuscator.ts @@ -131,20 +131,14 @@ export class Obfuscator implements IObfuscator { // first pass: control flow flattening if (this.options.controlFlowFlattening) { - astTree = this.transformAstTree( - astTree, - Obfuscator.controlFlowTransformersList - ); + astTree = this.transformAstTree(astTree, Obfuscator.controlFlowTransformersList); } // second pass: nodes obfuscation - astTree = this.transformAstTree( - astTree, - [ - ...Obfuscator.convertingTransformersList, - ...Obfuscator.obfuscatingTransformersList - ] - ); + astTree = this.transformAstTree(astTree, [ + ...Obfuscator.convertingTransformersList, + ...Obfuscator.obfuscatingTransformersList + ]); this.obfuscationEventEmitter.emit(ObfuscationEvents.AfterObfuscation, astTree, stackTraceData);