-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Rx.Observable.from
does not properly handle NodeList
#3041
Comments
does fromObservable suppose to return cold explicitly? I thought it depends on source type, like from(Promise) you won't get cold suscribes into new promise each time automatically. |
As far as i know promises are eager so it's not even possible for |
Makes me think that for |
I think my main question in here is this: does |
Interesting enough, var ar = [1,2,3];
const ar$ = Rx.Observable.from(ar);
ar$.subscribe(x => console.log('observer 1 ', x)); // 1,2,3
ar[2] = 5
ar$.subscribe(x => console.log('observer 2 ', x)); // 1,2,5 |
Regarding the iterator, in stable, it's obtained in the |
I just came to remind this, is this related with #2497 ? |
oh @cartant already pointed it. |
I think i actually prefer My question is answered so it can be closed for me, unless anyone has another reason to keep it open? |
@Dorus let me close issue, and sorry for bringing confusion. I did misread original issue obviously and caused confusions around. |
@Dorus You most likely already know this, but you can work around the problem in version 5 using const button$ = Rx.Observable.defer(() => Rx.Observable.from(buttons)); |
@cartant Yes i did know that, but thanks for the suggestion anyway. It's exactly what i suggested @mocheng on gitter 3 november 2017 12:14 as he's the one that came up with this scenario. @kwonoj No prob about the confusion, at least it kept the issue active and quickly resolved :) |
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Consider the following code:
Rx.Observable.from
should result in a cold observable that emit the same list each time it is subscribed. However, in this example the source is a NodeList and the second subscription does not emit.The text was updated successfully, but these errors were encountered: