translate.get(...).flatMap(...) not working in pending state
See original GitHub issueI’m submitting a … (check one with “x”)
[x] bug report => check the FAQ and search github for a similar issue or PR before submitting
[x] support request => check the FAQ and search github for a similar issue before submitting
[ ] feature request
Not sure if it’s a bug or misuse by me…
Current behavior
Using translate.get('...').flatMap(...).subscribe(observer)
does not work if this.pending
is set.
Expected/desired behavior
The observer
gets called with the translation.
Reproduction of the problem
Made a small plunker. Calling doIt()
from ngOnInit()
does not work, calling it afterwards works just fine. Although I didn’t dig too deep it looks like to be caused by this.pending
.
Issue Analytics
- State:
- Created 7 years ago
- Comments:7 (4 by maintainers)
Top Results From Across the Web
swift - Cannot map error after flatMap usage (Never result type)
Problem is in getData function where in MapError pipeline I am getting: Cannot convert value of type () to closure result type Never....
Read more >reactor/reactor - Gitter
hi, i have stupid problem. I don't know how to add the mono contents into the subscriber context. e.g. Mono.just("val").map(v -> {addToCtx(v); return...
Read more >Part 2: Processing Data with Java SE 8 Streams - Oracle
We can fix this problem by using a flatMap , as shown in Listing 7. Using the flatMap method has the effect of...
Read more >Introduction to Future in Vavr - Baeldung
Get started with Spring 5 and Spring Boot 2, through the Learn Spring course: ... The Future can be in one of two...
Read more >Reactor 3 Reference Guide
All of Reactor is open source, including this documentation. If you find problems with the docs or if you want to improve them,...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Ok, I found the root issue.
getTranslation
was usingshare()
which was creating a hot observable, and then immediately subscribing to it. Once this subscription was done, thepending
observable stopped because there are no more subscribers. Any subscribers afterwards were ignored.Thanks a lot for taking the time to find another solution and submitting a PR, I’ve merged it!