Dynamic group tasks do not terminate if there are zero tasks
chrisirhc opened this issue · 2 comments
chrisirhc commented
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?
xavi- commented
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
alexanderdean commented
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).