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

BehaviorSubject.scan not picking up initial value #3168

Closed
mbrandonw opened this issue Aug 20, 2015 · 2 comments
Closed

BehaviorSubject.scan not picking up initial value #3168

mbrandonw opened this issue Aug 20, 2015 · 2 comments
Labels

Comments

@mbrandonw
Copy link

I would expect this:

final Observable<Void> ob = BehaviorSubject.create();
ob.scan(0, (accum, x) -> 123)
  .subscribe(x -> {
    Timber.d("Hit!");
  });

to emit a value (and indeed it does in the equivalent RxJS code).

Is this a bug?

@akarnokd
Copy link
Member

This is odd. The initial value is emitted just before the first accumulated value or a completion event.

@akarnokd
Copy link
Member

Fix available via #3171.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants