We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Current Behavior After #4640, forkJoin(promise) throws an error
forkJoin(promise)
You provided 'null' where a stream was expected. You can provide an Observable, Promise, Array, or Iterable.
Note that this only happens if you provide forkJoin with a single argument of type Promise.
forkJoin
Promise
Reproduction
forkJoin(Promise.resolve('hello')).subscribe(result => console.log(result));
Expected behavior forkJoin(promise) should behave the same as forkJoin([promise]), like it does for Observable.
forkJoin([promise])
Environment
Possible Solution Don't just check for isObservable, but also isPromise (and strictly speaking, check for Iterable too).
isObservable
isPromise
rxjs/src/internal/observable/forkJoin.ts
Line 150 in cd5895d
should become
if (isObject(first) && !isObservable(first) && !isPromise(first) && !isIterable(first))
The text was updated successfully, but these errors were encountered:
test(forkJoin): add failing test for ReactiveX#4737
08782ea
fix(forkJoin): test for object literal not observable
7cb2ab9
Closes ReactiveX#4737.
c11e1b3
fix(forkJoin): test for object literal (ReactiveX#4741)
1403c6c
* test(forkJoin): add failing test for ReactiveX#4737 * fix(forkJoin): test for object literal not observable Closes ReactiveX#4737.
No branches or pull requests
Bug Report
Current Behavior
After #4640,
forkJoin(promise)
throws an errorNote that this only happens if you provide
forkJoin
with a single argument of typePromise
.Reproduction
Expected behavior
forkJoin(promise)
should behave the same asforkJoin([promise])
, like it does for Observable.Environment
Possible Solution
Don't just check for
isObservable
, but alsoisPromise
(and strictly speaking, check for Iterable too).rxjs/src/internal/observable/forkJoin.ts
Line 150 in cd5895d
should become
The text was updated successfully, but these errors were encountered: