Closed myndzi closed 9 years ago
It appears to be the fault of the synchronous 'emit' -- if I make that asynchronous by wrapping it in process.nextTick(), it behaves as expected.
Yes, there is a bug. Not easy to fix on the first look though. Funny that I found similar bug in Bacon recently https://github.com/baconjs/bacon.js/issues/523
The bug occurs when you truing to unsubscribe from a stream in response to the first value from it, and that first value is emitted synchronously.
Will think of how to fix this.
The fix was actually pretty easy. Fixed in v0.5.2.
Cool, thanks!
Back to trying to get pagination to work
Test code:
The unsubscribe callback is never called
According to this issue, the subscriber to 'thing' should detach automatically after 1 item, so maybe this is a bug with fromBinder?
Interestingly, if I change it to take(2), the callback is called