Closed lling1105 closed 6 months ago
Moleculer tries to detect the event handler signature, but if the property name is not ctx
it uses as a non-context signature. You can force the context signature mode with context: true
in event properties, like here:
Moleculer tries to detect the event handler signature, but if the property name is not
ctx
it uses as a non-context signature. You can force the context signature mode withcontext: true
in event properties, like here:
thanks much @icebob for your reply! the same time i also find another solution is set the obfus options as below and working well
options:{
reservedNames: ['context','ctx'],
reservedStrings: ['context','ctx']
}
Current Behavior
if not using grunt-contrib-obfuscator, every service is working well. after obfuscator, action and method are working well,but the event method received ctx only has param property, other ctx property lost
Expected Behavior
use grunt-contrib-obfuscator to obfus the codes and working well.
Context
Please provide any relevant information about your setup. This is important in case the issue is not reproducible except for under certain conditions.