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

Waterfall multiple callback defense #1050

Merged
merged 3 commits into from
Mar 8, 2016

Conversation

aearly
Copy link
Collaborator

@aearly aearly commented Mar 7, 2016

Closes #815 .

This introduces a breaking change -- previously multiple callbacks would call the rest of the waterfall multiple times, now calling a callback multiple times is an error.

This also fixes a detail related to #696 -- no unnecessary deferrals in waterfall.

@aearly aearly added this to the 2.0 milestone Mar 7, 2016
return rest(function(err, args) {
function nextTask(args) {
if (taskIndex === tasks.length) {
return cb.apply(null, [null].concat(args));
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's being transpiled so you can do cb(null, ...args)

aearly added a commit that referenced this pull request Mar 8, 2016
@aearly aearly merged commit f51042c into master Mar 8, 2016
@aearly
Copy link
Collaborator Author

aearly commented Mar 9, 2016

:( I just noticed that dist/async.js isn't run through babel, just rollup. I'll have to tweak the build if we want to support more than just ES6 modules.

@megawac
Copy link
Collaborator

megawac commented Mar 9, 2016

Ah, lets not do that for now in that case

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

Successfully merging this pull request may close these issues.

Defend against multiple callbacks in async.waterfall
2 participants