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

fix(zipAll): complete when the source is empty #2451

Merged
merged 1 commit into from
Mar 16, 2017

Conversation

martinsik
Copy link
Contributor

This fixes the situation where the zipAll() operator doesn't send complete notification when the source Observable is empty:

Observable
  .empty()
  .zipAll()
  .subscribe(null, null, () => console.log('complete 1'));

This doesn't print anything. Demo: https://jsbin.com/fucijuz/2/edit?js,console

Description:

This problem occurs only when using zipAll() and not zip(). The zip() operator internally wraps zipAll() with ArrayObservable. So the following works fine:

Observable
  .zip(Observable.empty())
  .subscribe(null, null, () => console.log('complete 2'));

This is internally called as:

Observable
  .from([Observable.empty()])
  .zipAll()
  .subscribe(null, null, () => console.log('complete 3'));

which is all right.

Related issue (if exists):
#2426

@coveralls
Copy link

Coverage Status

Coverage increased (+0.001%) to 97.689% when pulling 712fece on martinsik:zip-send-complete-on-empty into 69d051b on ReactiveX:master.

@lock
Copy link

lock bot commented Jun 6, 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 6, 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 this pull request may close these issues.

4 participants