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

yield [] should return immediately an empty array instead of blocking… #71

Merged
merged 1 commit into from Feb 3, 2016

Conversation

Projects
None yet
2 participants
@slorber
Contributor

slorber commented Feb 2, 2016

… forever, like Promise.all([]) did

@yelouafi I encountered a bug while trying to replace:

function* cancelAll(tasks) {
  try {
    yield tasks.map(cancel)
  }
  catch(err) { void(0); }
}

let subtasks = [];
yield fork(cancelAll,subtasks);

by:

let subtasks = [];
yield subtasks.map(cancel);

It seems your new promiseless implementation does not handle empty arrays and this PR seems to solve the issue

yelouafi added a commit that referenced this pull request Feb 3, 2016

Merge pull request #71 from slorber/master
yield [] should return immediately an empty array instead of blocking…

@yelouafi yelouafi merged commit 992e1fb into redux-saga:master Feb 3, 2016

@yelouafi

This comment has been minimized.

Member

yelouafi commented Feb 3, 2016

thanks! I missed this one :)

@yelouafi

This comment has been minimized.

Member

yelouafi commented Feb 3, 2016

FYI released a patch version 0.6.1 with this fix.

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