caolan / caolan/highland

Otherwise doesn't forward 'end' event

Open
#142 2 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
JavaScript
Stars
3.4k
Forks
145
PR merge metrics
No merged PRs in 30d

Description

In the below snippet, I expect both the generator and otherwise 'end' events to fire, but only the generator's ever does.

``` js
var generator = $(function (push, next) {
push(null, $.nil);
});

generator.on('end', function () {
console.log('generator end');
})

var otherwise = $([]).otherwise(generator).on('end', function() {
console.log('otherwise end')
});
generator.resume();
otherwise.resume();
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.