-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Closed
Description
In v3, a change occurred in queues/cargos handling : the push method now deeply flats array passed as data.
What version of async are you using?
3.0.0
Which environment did the issue occur in (Node version/browser version)
Node 12.3.1
What did you do? Please include a minimal reproducible case illustrating issue.
const myCargo = async.cargo(async (data) => {
console.log(data);
});
const myData1 = [1, 2, 3];
const myData2 = [4, 5, 6];
myCargo.push([myData1, myData2]);
What did you expect to happen?
The output should be [[1, 2, 3], [4, 5, 6]]
What was the actual result?
In v3, the main array is deeply flatten and the output is [1, 2, 3, 4, 5, 6] (or with a true async code, it could be [1, 2, 3] and [4, 5, 6]), so we cannot pass arrays as data anymore to queues/cargos.
Metadata
Metadata
Assignees
Labels
No labels