ratelimit + done throws an error
Open
bug
- Dominant language
- JavaScript
- Stars
- 3.4k
- Forks
- 145
- PR merge metrics
- No merged PRs in 30d
Description
Consider:
```
highland([1, 2, 3]).ratelimit(1, 1000).each(function () {}).done(function () {});
```
This code throws:
```
Uncaught Error: Can not write to stream after nil
```
inside of consume.
The issue _appears_ to be that we are emitting `nil` before we emit 3.
Contributor guide
Research direction
Reproduce the issue with the ratelimit(1, 1000), each, and done example, then inspect the consume path and the ratelimit completion handling. Done means the example completes without the “Can not write to stream after nil” error and does not emit nil before the value 3.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- api
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100