Urigo / meteor-rxjs

Exposing Mongo Cursor as RxJS Observable

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

findOne when not ready => undefinded

jycouet opened this issue · comments

commented

Hi,

I'm facing an issue with findOne function.
Yes, when the subscription is not ready, the function return undefined.

Should we wait subscriptionReady for a findOne Operation?
Or I'm going in the wrong direction?

Let me know :)
Thank you

commented

Everything is wrapped in a:

MeteorObservable.autorun().zone().subscribe(() => {
...
});

I was taking the result only if DDP._allSubscriptionsReady() is true... but I found that sometime DDP._allSubscriptionsReady() is true and the findOne returns undefined! (I'm sure it's not undefined)

Could you help me? :)