-
-
Notifications
You must be signed in to change notification settings - Fork 32.2k
Closed
Labels
async_hooksIssues and PRs related to the async hooks subsystem.Issues and PRs related to the async hooks subsystem.docIssues and PRs related to the documentations.Issues and PRs related to the documentations.
Description
Using Node 12.19.0:
When binding a function with AsyncResource.bind, the arguments are not forwarded.
I had to write this workaround to make it work:
function bindWorkAround(cb) {
AsyncResource.bind(invokeOriginal);
let _arguments;
return onData;
function onData() {
_arguments = arguments;
invokeOriginal();
}
function invokeOriginal() {
cb.apply(null, _arguments);
}
}
KelWill
Metadata
Metadata
Assignees
Labels
async_hooksIssues and PRs related to the async hooks subsystem.Issues and PRs related to the async hooks subsystem.docIssues and PRs related to the documentations.Issues and PRs related to the documentations.