map: Don't wait before proceeding if callback returns promise.
This commit is contained in:
parent
615f9914ee
commit
4930e4204d
1 changed files with 3 additions and 3 deletions
|
@ -160,9 +160,9 @@ const Channel = function(length = 0) {
|
||||||
map: (callbackfn, thisArg) => {
|
map: (callbackfn, thisArg) => {
|
||||||
const output = Channel();
|
const output = Channel();
|
||||||
(async () => {
|
(async () => {
|
||||||
await readOnly.forEach(value =>
|
await readOnly.forEach(value => {
|
||||||
output.push(callbackfn.call(thisArg, value))
|
output.push(callbackfn.call(thisArg, value));
|
||||||
);
|
});
|
||||||
|
|
||||||
output.close();
|
output.close();
|
||||||
})();
|
})();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue