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

defaultIfEmpty(Observable<T> t) #1878

Closed
benjchristensen opened this issue Nov 13, 2014 · 2 comments
Closed

defaultIfEmpty(Observable<T> t) #1878

benjchristensen opened this issue Nov 13, 2014 · 2 comments
Milestone

Comments

@benjchristensen
Copy link
Member

Went to use defaultIfEmpty and found it only accepts a single value .... instead of an Observable which means I can't pass in an Observable.error.

It would be very helpful to have defaultIfEmpty(Observable<T> t)

@benjchristensen benjchristensen added this to the 1.0.x milestone Nov 13, 2014
@zsxwing
Copy link
Member

zsxwing commented Nov 14, 2014

+1. Then tail in RxScala can be implemented by o.defaultIfEmpty(Observable.error(new UnsupportedOperationException("tail of empty list"))).drop(1)

@samueltardieu
Copy link
Contributor

Maybe switchIfEmpty would be a better name.

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

No branches or pull requests

3 participants