mirror of
https://github.com/javascript-obfuscator/javascript-obfuscator
synced 2026-08-09 12:42:29 +00:00
custom nodes: on -> once event emitter change
This commit is contained in:
Vendored
+1
-1
@@ -1677,7 +1677,7 @@ var Obfuscator = function () {
|
||||
NodeUtils_1.NodeUtils.parentize(astTree);
|
||||
this.customNodesStorage.initialize(this.stackTraceAnalyzer.analyze(astTree.body));
|
||||
this.customNodesStorage.getStorage().forEach(function (customNode) {
|
||||
_this.obfuscationEventEmitter.on(customNode.getAppendEvent(), customNode.appendNode.bind(customNode));
|
||||
_this.obfuscationEventEmitter.once(customNode.getAppendEvent(), customNode.appendNode.bind(customNode));
|
||||
});
|
||||
this.obfuscationEventEmitter.emit(ObfuscationEvents_1.ObfuscationEvents.BeforeObfuscation, astTree);
|
||||
if (this.options.controlFlowFlattening) {
|
||||
|
||||
+1
-1
@@ -77,7 +77,7 @@ export class Obfuscator implements IObfuscator {
|
||||
this.customNodesStorage
|
||||
.getStorage()
|
||||
.forEach((customNode: ICustomNode) => {
|
||||
this.obfuscationEventEmitter.on(customNode.getAppendEvent(), customNode.appendNode.bind(customNode));
|
||||
this.obfuscationEventEmitter.once(customNode.getAppendEvent(), customNode.appendNode.bind(customNode));
|
||||
});
|
||||
|
||||
this.obfuscationEventEmitter.emit(ObfuscationEvents.BeforeObfuscation, astTree);
|
||||
|
||||
Reference in New Issue
Block a user