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

rxjs 6.3 mergeMap no longer works with Observable from a promise #4073

Closed
menved opened this issue Aug 31, 2018 · 4 comments
Closed

rxjs 6.3 mergeMap no longer works with Observable from a promise #4073

menved opened this issue Aug 31, 2018 · 4 comments

Comments

@menved
Copy link

menved commented Aug 31, 2018

rxjs version 6.3 mergeMap no longer works with an Observable from a promise (compared with version 6.2.2).
The Observable never subscribes.

myObservable
.pipe(
  mergeMap(x =>
     from(Promise.resolve(['test']))
  )
.subscribe()

Environment

  • Runtime: Node v10.9.0
  • RxJS version: 6.3
  • webpack 4.17.1
@cartant
Copy link
Collaborator

cartant commented Aug 31, 2018

See #4071 and #4072. Hopefully, this is the same problem - which has been fixed.

@LM-G
Copy link

LM-G commented Aug 31, 2018

@cartant Hello, there is a problem on the from, if you do something like this

from(SOME_PROMISE).pipe(switchMap(() => SOME_OBSERVABLE)).subscribe(...)

with SOME_OBSERVABLE getting an event in the future, the subscription of SOME_OBSERVABLE is canceled instantly.

@cartant
Copy link
Collaborator

cartant commented Aug 31, 2018

@LM-G as stated above, see the failing tests that were fixed in #4072. Said tests used from with promises.

@menved
Copy link
Author

menved commented Aug 31, 2018

Version 6.3.1 has solved the problem :)

@menved menved closed this as completed Aug 31, 2018
@lock lock bot locked as resolved and limited conversation to collaborators Sep 30, 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

No branches or pull requests

3 participants