Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

q.push deeply flats arrays in v3 #1645

darksabrefr opened this issue May 24, 2019 · 0 comments

q.push deeply flats arrays in v3 #1645

darksabrefr opened this issue May 24, 2019 · 0 comments


Copy link

darksabrefr commented May 24, 2019

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?

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) => {
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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
None yet

No branches or pull requests

1 participant