You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I checked to make sure that this issue has not already been filed
I'm reporting the issue to the correct repository
Current Behavior
In MoleculerJS version 0.14.33+, the call(next) middleware hook no longer has access to the this context. In previous versions (e.g., 0.14.32), this inside the call(next) hook referred to the broker instance, which was useful for accessing broker-level properties like nodeID or logging functionalities.
Upon investigation, it seems this regression may have been introduced by the changes in Pull Request #1270, which adjusted the context binding in certain hooks. While this change likely aimed to address other issues, it inadvertently broke access to this in the call(next) hook.
Expected Behavior
I can access broker using 'this' in a call(next) hook
Current Behavior
In MoleculerJS version 0.14.33+, the call(next) middleware hook no longer has access to the this context. In previous versions (e.g., 0.14.32), this inside the call(next) hook referred to the broker instance, which was useful for accessing broker-level properties like nodeID or logging functionalities.
Upon investigation, it seems this regression may have been introduced by the changes in Pull Request #1270, which adjusted the context binding in certain hooks. While this change likely aimed to address other issues, it inadvertently broke access to this in the call(next) hook.
Expected Behavior
I can access broker using 'this' in a call(next) hook
Steps to Reproduce
Using this codesandbox : https://codesandbox.io/p/devbox/moleculer-sample-forked-p4hjmx
Switch between versions 0.14.32 and 0.14.33 in package.json,
npm i
and see that with 0.14.32 it logsmyNode
and with 0.14.33 it logsundefined
The text was updated successfully, but these errors were encountered: