You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I noticed this odd behavior (what looks like a bug). When remember is called directly on a raw stream created via xs.create that has no producer (i.e. which will emit based on the shamefully* methods), it doesn't add listeners since the _prod property is undefined.
import xs from 'xstream'
const test$ = xs.create()
// This line works
//const oddBehavior$ = test$
// This line does not work. Why?
const oddBehavior$ = test$.remember()
oddBehavior$.addListener({
next: n => bin.log(`Next: ${n}`),
error: e => bin.log(`Error: ${e}`),
complete: () => bin.log(`Complete`)
})
test$.shamefullySendNext(1)
Fixes issue #69.
* Prevent stack overflow while detecting cycles in _onlyReachesThis
* fix `remember` for usage with 'subjects'
* add test
* fix test
* fix(flatten): fix broken flatten on empty outer
Flatten should do a check if the inner stream is null when stopping the FlattenOperator, before
removing the listener from the inner stream.
* chore(package): release new version
* fix `remember` for usage with 'subjects'
* add test
* fix test
* split tests
I noticed this odd behavior (what looks like a bug). When
remember
is called directly on a raw stream created viaxs.create
that has no producer (i.e. which will emit based on theshamefully*
methods), it doesn't add listeners since the_prod
property isundefined
.You can see the issue here: http://www.webpackbin.com/4JFCBWrL-
The text was updated successfully, but these errors were encountered: