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

$script.order() mutate the paths array parameter #95

Open
Yimiprod opened this issue Apr 26, 2016 · 0 comments
Open

$script.order() mutate the paths array parameter #95

Yimiprod opened this issue Apr 26, 2016 · 0 comments

Comments

@Yimiprod
Copy link

import scriptjs from 'scriptjs';

const LIBS = ['url/to/main/lib.js', 'url/to/dep/lib.js'];

scriptjs.order(LIBS, () => done());
scriptjs.order(LIBS, () => done());

The second one will throw an error because LIBS will be mutated with the .shift() and will be empty.

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

No branches or pull requests

1 participant