Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error on complete when using .bufferTime().take() #1763

Closed
msrch opened this issue Jun 12, 2016 · 2 comments · Fixed by #1764
Closed

Error on complete when using .bufferTime().take() #1763

msrch opened this issue Jun 12, 2016 · 2 comments · Fixed by #1764

Comments

@msrch
Copy link

msrch commented Jun 12, 2016

RxJS version:
rxjs@5.0.0-beta.8

Code to reproduce:

jsbin example

var source = Rx.Observable.interval(100)

source
  .bufferTime(1000)
  .take(2)
  .subscribe(x => console.log(x))

Expected behavior:

Should complete without any errors.

Actual behavior:

Throws an error on complete:

TypeError: Cannot read property 'splice' of null

Additional information:

Does work in RxJS 4 - jsbin example

@kwonoj
Copy link
Member

kwonoj commented Jun 12, 2016

Yes, confirmed behavior. It's occurring by take synchronously unsubscribe immediately after emitting last value to be taken, bufferTime doesn't aware of it and try to update contexts. Filed #1764 to update.

@lock
Copy link

lock bot commented Jun 7, 2018

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked as resolved and limited conversation to collaborators Jun 7, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants