Open bbuck opened 3 months ago
Seems to affect 3.2.5 as well, just wanted to verify: https://runkit.com/bbuck/native-async-functions-in-async-waterfall-pass-undefined
I also encountered this problem. Using native Async will lose Callback and can only use Promise
It seems async functions that return nothing (implicitly resolves to undefined) pass on
undefined
as a value to the next function in line which I would not expect to happen. Returningundefined
from a function is the default behavior of "returning nothing."What version of async are you using?
3.2.4
Which environment did the issue occur in (Node/browser/Babel/Typescript version) Node 18 (18.20.2 specifically)
What did you do? Please include a minimal reproducible case illustrating issue.
What did you expect to happen?
The result array to have a single element, the callback function.
What was the actual result?
The array contains two items, the
undefined
resolved from the native async function and the callback function passed to the Node-style async function.