creationix/step

Dynamic group tasks do not terminate if there are zero tasks

chrisirhc opened this issue · 2 comments

To put simply:

  var group = this.group();
  [].forEach(group());

And:

  var group = this.group();
  [].forEach(function() {
    doSomething(group());
  });

will never terminate.

I know this is by design, but maybe there should be some documentation of how to handle such situations?
Or possibly have dummy callbacks?

I don't understand. How is this bug "by design"? Is there an example where this behavior might be useful?

In any case, I made a pull request that should fix this issue: #8

This one can be closed now. Just a note: the fix broke my existing code (I was tracking empty groups with an emptyGroup boolean and then doing an explicit return true if emptyGroup was set). The fix works a charm though (have removed my hacky code).