meteor-rxjs icon indicating copy to clipboard operation
meteor-rxjs copied to clipboard

findOne when not ready => undefinded

Open jycouet opened this issue 8 years ago • 1 comments

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

jycouet avatar Jan 26 '17 20:01 jycouet

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? :)

jycouet avatar Jan 31 '17 09:01 jycouet