Closed wyqydsyq closed 7 years ago
@Widdershin the work-around you suggested to force sink$
back to a normal Stream
when it's a MemoryStream
instead of skipping the .imiate()
altogether works well for me and seems less likely to introduce unintended side-effects than my previous commit.
I fixed up the test suite, just needed to check if sink$
was actually passed. Thanks for the contribution! 😄 I really appreciate all of your help.
I was getting an error in my application because my DOM driver
sink$
was somehow getting converted to aMemoryStream
which caused an uncaught exception to be thrown byxstream
when attempting to calllastSinkEvent$.imitate(sink$)
.I noticed that
lastSinkEvent$
is only ever actually used to figure out when to callshamefullySendNext()
onfilteredSink$
in situations where(isReplaying() && replayOnlyLastSink)
so I tried wrapping the imitate in that same condition and it seems to work fine. I'm unsure of the actual use-case forreplayOnlyLastSink
so wasn't able to test it by hand but my changes haven't broken any tests.