loopback-context
loopback-context copied to clipboard
Get null when calling in a callback
When I call getCurrentContext in the middleware, it works.
But when I call an async function like fetching from db in the middleware, and calling getCurrentContext in the callback of that async function, I get null
This is the only open issue in loopback-context where my PR #11 had not been mentioned yet. I'd like to try it on your issue, can you share a minimal example that reproduces your issue? Follow https://github.com/strongloop/loopback/wiki/Reporting-issues In short, you could fork loopback-sandbox and add the code required to reproduce your issue.
I am closing this issue as abandoned.